################################################### ### chunk number 1: test1 ################################################### #line 52 "exampleSweave.Rnw" a=1 b=4 a+b print("hello") ################################################### ### chunk number 2: test2 ################################################### #line 67 "exampleSweave.Rnw" plot(1:10, col="red", pch=19) ################################################### ### chunk number 3: test3 ################################################### #line 81 "exampleSweave.Rnw" par(mfrow=c(1,2)) plot(1:10, col="green", pch=21) barplot(height=sample(1:10,5), names=LETTERS[1:5], col=1:5) ################################################### ### chunk number 4: women ################################################### #line 98 "exampleSweave.Rnw" require(xtable) myTable<-summary(women) ################################################### ### chunk number 5: manualtab ################################################### #line 109 "exampleSweave.Rnw" nr = nrow(myTable); nc = ncol(myTable) for (i in 1:nr) for(j in 1:nc) { cat("$", myTable[i,j], "$") if(j < nc) cat("&") else cat("\\\\\n") } ################################################### ### chunk number 6: xtable1 ################################################### #line 125 "exampleSweave.Rnw" xtab<-xtable(myTable) print(xtab, floating=FALSE) ################################################### ### chunk number 7: xtable2 ################################################### #line 138 "exampleSweave.Rnw" xtab2<-xtable(myTable, caption="Summary of women data", label="Table:women") print(xtab2,include.rownames = FALSE) ################################################### ### chunk number 8: sessionInfo ################################################### #line 150 "exampleSweave.Rnw" sessionInfo();