pgfplotstable: ループ内で \pgfplotstablevertcat を使用する方法

pgfplotstable: ループ内で \pgfplotstablevertcat を使用する方法

私は知っていますその他のオプションあまりにも。

しかし、私は疑問に思いました。 ループ内で 1 行のテーブルを作成し、それを前の合計テーブルに追加するにはどうすればよいですか?

次の試行では、現在のループ値のみが受け入れられます。

これをどうすれば修正できますか?
私はこの機能を特に利用することに興味があります\pgfplotstablevertcat
これは可能ですか?

ここに画像の説明を入力してください

\documentclass{article}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}


\begin{document}
\section{Create following Table row by row}
\pgfplotstabletypeset[header=true, col sep=comma]{
k, 2k
1, 2
2, 4
3, 6
} 


\section{Try}
\pgfplotstableread[header=false, col sep=comma]{
k,    2k
}{\main}

Startsituation: \pgfplotstabletypeset[string type]{\main} 

\subsection{Loop}
\pgfplotsforeachungrouped \k in {1,2,3} {%%
\pgfmathsetmacro\Double{2*\k}
\pgfplotstableread[header=false, col sep=comma, 
row sep=\\ % <--- seems that he wants that............
]{
\k, \Double \\
}{\temp}

\noindent Temprow (good!): \pgfplotstabletypeset[]{\temp} 

\pgfplotstablevertcat{\main}{\temp} 
\noindent Tempsituation (bad!): \pgfplotstabletypeset[string type]{\main} 
}%%
\end{document}

関連情報