xtable()converts an R object into a table that can be printed as LaTeX or as HTML.
g <- read.table('gender.txt',header=T) attach(g) library(xtable) g.lm <- lm(age ~ weight) print(xtable(g.lm)) print(xtable(g.lm), type='HTML')
R CMD Sweave filename.Rnwconverts a sweave file into a LaTeX file. For example: sw2.Rnw can be converted to sw2.pdf.
R CMD Sweave swtest.Rnw latex swtest latex swtest dvipdf swtest