Question: Relates to the question posed here. I have made one column from two, but I would like to round the numbers off from a precision of 4 to 2. How do I do that?
Here is the MWE:
\documentclass{standalone}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstableread[row sep=\\,col sep=&,header=true]{
var & mean & sd \\
x & 95.265 & 11.4801 \\
y & 85.7 & 18.95 \\
z & 15 & 5.01 \\
}\means
\pgfplotstabletypeset[
columns/var/.style={string type},
columns/mean/.style={fixed zerofill,precision=2},
columns/sd/.style={fixed zerofill,precision=2},
columns/mixed/.style={string type,column type=l,column name={Mean (SD)}},
columns={var, mixed},
create on use/mixed/.style={
create col/assign/.code={%
\edef\entry{\thisrow{mean} (\thisrow{sd})}%
\pgfkeyslet{/pgfplots/table/create col/next content}\entry
}
}
]\means \end{document}
The column "Mean (SD)" in the output is in the raw data format, even though I had specified the precision in the columns of "mean" and "sd". How do I get it to round off appropriately with zerofill?