[R] Displaying p-values in latex
Juned Siddique
siddique at ucla.edu
Thu Jul 28 23:00:29 CEST 2005
Hi. I want to create a table in latex with regression coefficients and their
corresponding p-values. My code is below. How do I format the p-values so
that values less than 0.0001 are formated as <.0001 rather than just rounded
to 0.0000? Thank you.
model<-lm(y~x1+x2)
output<-summary(model)
output<-as.matrix(coefficients(output))
output<-format.df(ouput,cdec=c(2,2,2,4))
latex(output,longtable=TRUE, file="C:/model.tex")
More information about the R-help
mailing list