# Scope issues with pgfplotstable [closed]

I created a command that creates a table and do some computations on it. And I would like to use this command several times.

\documentclass{minimal}
\usepackage{pgfplotstable}
\pgfplotstableset{%
create on use/tmp/.style={create col/set={2}}}%
\newcommand\createonecol[1]{%
\pgfplotstablenew[columns={tmp}]{6}{\data}
\pgfplotstabletranspose{#1}{\data}
}
\begin{document}
\createonecol{\dataA}
\createonecol{\dataB}
\end{document}


The problem is the following one: the second time I call \createonecol, the table in \data is not created, thus pgfplotstabletranspose fails.

If I put curly braces around each call to \createonecol, there is no problem. However I don't want to scope them since I want to access both dataA and dataB at the same time.

-
could you provide a full minimal example, i.e. with \dataA and \dataB set. That will make it a lot easier for others to help. –  zeroth Feb 15 '12 at 8:00