UCL/STAT - Eric Lecoutre

R2HTML package
U S I N G S W E A V E
R2HTML package contains a driver to Sweave function, allowing to embedd R code even in rather complex HTML files. Sweave in a wonderfull tool provided by Friedrich Leisch This HTML file has been preparsed by R Sweave tool to create some graphs on the fly. One could imagine create daily reports. <>= data(ToothGrowth) boxplot(len ~ dose, data = ToothGrowth, boxwex = 0.25, at = 1:3 - 0.2,subset= supp == "VC", col="yellow", main="", xlab="Vitamin C dose mg",ylab="tooth length", ylim=c(0,35),cex=0.4) @ Clik to enlarge | Here are some computations performed on those data: <>= data(ToothGrowth) tmp=tapply(ToothGrowth[,1],ToothGrowth[,3],summary) tmp2=matrix(unlist(tmp),ncol=3) dimnames(tmp2)=list(names(tmp[[1]]),paste("dose=",unique(ToothGrowth[,3]),sep="")) HTML(as.data.frame(tmp2),align="right") @ summary of Tooth Length depending on Dose
|  | Contact: Eric Lecoutre <lecoutre@stat.ucl.ac.be> | Dernière modification: 7/03/2003 Institut de statistique, UCL Voie du Roman Pays, 20 B-1348 Louvain-la-Neuve Belgium |  | Bureau Tel Fax E-Mail | C.133 +32 10 47.30.50 +32 10 47.30.32 lecoutre@stat.ucl.ac.be

<>= png("toothbig.png",width=1000,height=1000) boxplot(len ~ dose, data = ToothGrowth, boxwex = 0.25, at = 1:3 - 0.2, subset= supp == "VC", col="yellow", main="Guinea Pigs' Tooth Growth", xlab="Vitamin C dose mg", ylab="tooth length", ylim=c(0,35)) dev.off() @