# create tables using pgfplotstable

I am trying to create a table where the values for each column is read from a log file. I am trying this simple piece of code:

    \documentclass{article}

\usepackage{pgfplotstable}

\begin{document}

\pgfplotstablecreatecol[copy column from table={\dataB}{[index] 0}] {par1} {\dataA}
\pgfplotstablecreatecol[copy column from table={\dataB}{[index] 1}] {par2} {\dataA}

\pgfplotstabletypeset{\dataA}
\end{document}


where the log files look like h1_error.log=

<#N      H1 error
40  0.231438
#N       H1 error
40  -nan
#N       H1 error
40  0.231438
#N       H1 error
5   1.32218
#N       H1 error
5   1.60331
>


and l2_error.log=

<
#N       L2 error
40  0.00624957
#N       L2 error
40  0.00809222
#N       L2 error
40  0.00624957
#N       L2 error
5   0.246561
#N       L2 error
5   0.307461
>


but I keep getting,

I do not know the key '/pgf/number format/copy column from table' and I am going to ignore it. Perhaps you misspelled it.

if I only use

\begin{document}
\pgfplotstabletypeset{\dataA}
\end{document}


I get what I want

Anyone knows whats going on? thanks in advance.

• Try typesetting the data first to see what got read in. And use [string type]. – John Kormylo May 15 '17 at 19:52
• @JohnKormylo I have edited the question, I guess now its clear. – Noname May 15 '17 at 20:01
• They are column names – Noname May 15 '17 at 20:29

I get no error from the following MWE.

\documentclass{article}

\usepackage{pgfplotstable}

\begin{document}
0  1
40 .23
40 nan
40 .23
5  1.32
5  1.6
}\dataA

0  1
40 .23
40 nan
40 .23
5  1.32
5  1.6
}\dataB

\pgfplotstablecreatecol[copy column from table={\dataB}{[index]0}] {par1} {\dataA}
\pgfplotstablecreatecol[copy column from table={\dataB}{[index]1}] {par2} {\dataA}

\pgfplotstabletypeset{\dataA}
\end{document}

• When I just copy and paste above MWE, I can't compile using TexMaker 4.5 :( and can't see any pdf :( – Noname May 16 '17 at 6:52
• Using the above MWE, I keep getting [Package pgfkeys Error: I do not know the key '/pgfplots/table/copy/column fro m table' and I am going to ignore it. Perhaps you misspelled it.] Anyone has an idea about what is going on? I am on Mac computer and compiling the tex file using Texmaker 4.5 – Noname May 16 '17 at 7:57
• You probably need to update your packages. – John Kormylo May 16 '17 at 12:54