[R] Basic Sweave

alexander.weidstam at gmail.com alexander.weidstam at gmail.com
Tue Oct 27 15:54:48 CET 2009


Hi, I have this basic R code that I would like to rewrite into Sweave code. Ideally I would like Latex to display both the code and the "statistics". R and Sweave is completely new to me so I would really appreciate some help. 

read.table("df1.txt", header=TRUE, sep=";", na.strings=c("na","."), skip="1", dec="0",nrows=1000)

df1.rda<-read.table("df1.txt", header=TRUE, sep=";", na.strings=c("na","."), skip="1", dec="0",nrows=1000)

str(df1.rda)
summary(df1.rda)

mean(df1.rda, na.rm=TRUE)
sd(df1.rda, na.rm=TRUE)

attach(df1.rda)

plot(wage,school)
pdf(file = "df1.pdf", paper = "A4")



--
This message was sent on behalf of alexander.weidstam at gmail.com at openSubscriber.com
http://www.opensubscriber.com/messages/r-help@r-project.org/topic.html




More information about the R-help mailing list