Re: [R] Sweave for inclusion of p value in a sentence of a LaTeX document

2010-08-07 Thread Matthieu Dubois
Dear Julia, my way to do that is to attribute the t.test to an object, and then refer to its p.value with the function \Sexpr e.g. \documentclass{article} \usepackage{Sweave} \begin{document} <>= x<-cbind(1,2,3) y<-cbind(3,4,5) t <- t.test(x,y) @ The

[R] Sweave for inclusion of p value in a sentence of a LaTeX document

2010-08-07 Thread julia . jacobson
Dear R Users, I would like to include the p value in the results returned by the t.test function in a sentence of a LaTeX document. For this purpose, I use the following code (file.Rnw): \documentclass{article} \begin{document} The p value for my data was <>= x<-cbind(1,2,3) y<-cbind(3,4,5) t.