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
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.
2 matches
Mail list logo