# 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.

-

## closed as too localized by lockstep, Marco Daniel, percusse, Peter Grill, JakeApr 5 '12 at 5:42

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

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