This is similar to pgfplots input parse error with expression, except my problem is not with expr but with create col/linear regression. Here's a MNWE:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
\usepackage{pgfplotstable}
\begin{filecontents*}{testdata.csv}
a,b
1,
2,1
3,2
4,3
\end{filecontents*}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[only marks] table[x=a,y=b,col sep=comma]{testdata.csv};
\addplot[no markers] table[x=a,y={create col/linear regression={y=b}},col sep=comma]{testdata.csv};
\end{axis}
\end{tikzpicture}
\end{document}
This gives
NOTE: coordinate (1,) has been dropped because of a coordinate filter. (see als
o unbounded coords=jump).
! Package PGF Math Error: Could not parse input '' as a floating point number,
sorry. The unreadable part was near ''..
See the PGF Math package documentation for explanation.
Type H <return> for immediate help.
...
l.17 ...ssion={y=b}},col sep=comma]{testdata.csv};
?
In my real example, I've merged multiple measurements into the same file, and some measurements are missing values for some values of the independent variable. I want to skip over those points in plotting and linear regression. My input file is fixed (I can't easily split the file into multiple inputs), but I'm fine with code that reprocesses the table or whatever. How can I avoid getting this error?
(Also, is this a bug in pgfplotstable that should be reported?)