Question: I am trying to select certain rows, similar to this question Selecting rows to be displayed with pgfplotstable, however I am not sure how I would go about doing it. I want to display only every 4th row. Something like skip rows between index but more automated than that (the file is fairly long). I have attempted to use the code below code, but I am at a loss as to how I would output only every 4th row (starting from 1 (ie: 1, 5, 9, etc). I assume some type of math operator would work, but how?
\documentclass{standalone}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstableread{
obs number
1 2
2 5
3 3
4 2
5 4
6 1
7 2
8 5
9 3
10 2
11 4
12 1
}\loadedtable
\pgfplotstabletypeset[
row predicate/.code={%
\pgfplotstablegetelem{#1}{obs}\of{\loadedtable}
\ifnum\pgfplotsretval=??\relax %Use some seq operator?
\else\pgfplotstableuserowfalse
\fi}
]{\loadedtable}
\end{document}

\pgfmathresult=1. – percusse Nov 02 '12 at 17:06\pgfplotstablegetelemmight be very inefficient, especially for "large tables" (unless "large" means <50 rows). But since obs is more-or-less equivalent to\pgfplotstablerow, you may want to prefer\pgfplotstablerow– Christian Feuersänger Nov 10 '12 at 21:36