I have a table, read from a file, and I would like to display only rows which have a specific value in a given column.
Here is an ECM:
\documentclass{minimal}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstableread{
num value
1 2
2 5
1 3
3 2
1 4
2 1
}\data
\pgfplotstabletypeset[row predicate/.code={%
\ifnum\pgfplotstablegetelem{#1}{num}\of{\data}=1\relax
\else\pgfplotstableuserowfalse\fi}]{\data}
\end{document}
I would expect to seen only rows whose num value is 1. But I get an error when compiling:
ERROR: Missing number, treated as zero.
--- TeX said ---
\begingroup
l.14 ...after\pgfplotstableuserowfalse\fi}]{\data}
Do you have any idea on what to do so that only specific rows are displayed?
