how do I change each 0.0 to -- without having to reference each as string type or making the whole table string type? The actual table is quite long and it would take too long to do it manually. For the same reason there would be a marked improvement in readability if the table wasn't cluttered up with lots of zeros.
The final table should look something like
Flow Bibble Bobble Gumph
Extant 1 2 3
Intant -- 4 5
My sainted aunt -- 6 7
using for example the MWE below,
\documentclass{article}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstabletypeset[columns/Flow/.style={string type,column type={l}},ignore chars={\^^M},col sep=&,row sep=\\]{
<<results='asis',echo=FALSE>>=
someStuff=read.table(textConnection("
Flow, Bibble , Bobble , Gumph
Extant, 1, 2, 3
Intant, 0.0 , 4, 5
My sainted aunt, 0.0, 6, 7),header=F,sep=",")
print(xtable(someStuff),include.rownames=F,include.colnames=F,hline.after=NULL,only.contents=T)
@
}
\end{document}
string replaceinmath-modeit does the trick. so...,string replace*={0.0}{$-$},gives me the result I need. – Tahnoon Pasha Nov 22 '12 at 1:45string replacesounds like the most simple solution. An alternative would be to write some TeX code which is simular to theclear infinitestyle (by copy-pasting from the source code). But that is clearly much more involved. – Christian Feuersänger Nov 22 '12 at 19:52