[R] Displaying p-values in latex

From: Juned Siddique <siddique_at_ucla.edu>
Date: Fri 29 Jul 2005 - 07:00:29 EST


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")



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 29 07:04:46 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:07 EST