[R] tex/latex output?

Jonathan Baron baron at cattell.psych.upenn.edu
Wed Mar 20 17:42:54 CET 2002


On 03/20/02 08:11, Jeff D. Hamann wrote:
>Is it possible to write the output/results (redirect) to a latex file?

Look up the xtable package in the contributed section of CRAN.

I also find the following function useful for cutting and pasting
the results of t tests:

ttest  <- function (x)
{
tc <- t.test(x)
print(paste("($t_{",tc[[2]],"}=",formatC(tc[[1]],format="f",digits=2),
            "$,
	    $p=",formatC(tc[[3]],format="f"),"$)",sep=""),quote=FALSE)
print(tc$estimate)
}

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list