[R] R number format with Hmisc and knitr

Simon Zehnder szehnder at uni-bonn.de
Wed Jul 31 17:05:02 CEST 2013


Dear R-Users and R-Devels,

I have a problem when using knitr in combination with Hmisc. I generate a data.frame which has mixed scientific and non-scientific numbers inside. In my Latex Table I just want to have non-scientific format, so I call

latex(myDataFrame,
file = '',
cdec = c(0, rep(4, NROW(myDataFrame) - 1)),
)

Usually this works, but in this case it doesn't. I do not know why but suspect the mixed data format to be the culprit. What could I do?

Using format(, scientific = FALSE) before or options(scipen = 4) before has no influence. 


Best

Simon



More information about the R-help mailing list