{"type":"title","title":"","text":"R package `rrtable`","code":"","option":""} {"type":"subtitle","title":"","text":"Reproducible Research with a Table of R codes","code":"","option":""} {"type":"author","title":"","text":"Keon-Woong Moon","code":"","option":""} {"type":"text","title":"Introduction","text":"If you are a data scientist or researcher, you will certainly be interested in reproducible research. R package `rrtable` makes it possible to make reports with HTML, LaTex, MS word or MS Powerpoint formats from a table of R codes.","code":"","option":""} {"type":"header2","title":"Package Installation","text":"You can install R package `rrtable` with the following command.","code":"if(!require(devtools)){ install.packages(\"devtools\") }\ndevtools::install_github(\"cardiomoon/rrtable\")","option":"echo=TRUE, eval=FALSE"} {"type":"header2","title":"Package Loading","text":"You can load the `rrtable` package with the following R command.","code":"require(rrtable)","option":"echo=TRUE"} {"type":"header2","title":"Sample Data","text":"Sample data sampleData3 is included in rrtable package. You can see the sampleData3 by folllowing R command.","code":"str(sampleData3)","option":"echo=TRUE, eval=TRUE"} {"type":"Data","title":"Paragraph","text":"You can make a paragraph with this data","code":"sampleData3","option":"landscape=TRUE"} {"type":"mytable","title":"mytable object","text":"You can add mytable object with the following R code.","code":"mytable(Dx~.,data=acs)","option":""} {"type":"plot","title":"Plot","text":"You can insert a plot into your document.","code":"plot(Sepal.Width~Sepal.Length,data=iris)","option":""} {"type":"ggplot","title":"ggplot","text":"You can insert a ggplot into a document","code":"ggplot(iris,aes(x=Sepal.Length,y=Sepal.Width,color=Species))+ geom_point()","option":""} {"type":"Rcode","title":"R code","text":"You can insert the result of R code. For example, you can insert the result of regression analysis.","code":"fit=lm(mpg~wt*hp,data=mtcars)\nsummary(fit)","option":""} {"type":"2ggplots","title":"Two ggplots","text":"You can insert two parallel ggplots with the following code.","code":"ggplot(iris,aes(Sepal.Length,Sepal.Width))+geom_point()\nggplot(iris,aes(Sepal.Length,Sepal.Width,colour=Species))+ geom_point()+guides(colour=FALSE)","option":""} {"type":"2plots","title":"Two plots","text":"You can insert two parallel plots with the following code.","code":"hist(rnorm(1000))\nplot(1:10)","option":""} {"type":"header2","title":"HTML Report","text":"You can get report with HTML format(this file) by following R command.","code":"data2HTML(sampleData3)","option":"echo=TRUE, eval=FALSE"} {"type":"header2","title":"MS word document","text":"You can get a report with MS word format.\n","code":"data2docx(sampleData3)","option":"echo=TRUE,eval=FALSE"} {"type":"","title":"","text":"You can download sample data: [sampleData3.docx](https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData3.docx) - view with [office web viewer](https://view.officeapps.live.com/op/view.aspx?src=https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData3.docx)","code":"data2docx(sampleData2)","option":"echo=TRUE,eval=FALSE"} {"type":"","title":"","text":"You can download sample data: [sampleData2.docx](https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData2.docx) - view with [office web viewer](https://view.officeapps.live.com/op/view.aspx?src=https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData2.docx)","code":"","option":""} {"type":"header2","title":"MS powerpoint document","text":"You can get a report with MS word format.","code":"data2pptx(sampleData3) ","option":"echo=TRUE,eval=FALSE"} {"type":"","title":"","text":"You can download sample data: [sampleData3.pptx](https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData3.pptx) - view with [office web viewer](https://view.officeapps.live.com/op/view.aspx?src=https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData3.pptx)","code":"data2pptx(sampleData2)","option":"echo=TRUE,eval=FALSE"} {"type":"","title":"","text":"You can download sample data: [sampleData2.pptx](https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData2.pptx) - view with [office web viewer](https://view.officeapps.live.com/op/view.aspx?src=https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData2.pptx)","code":"","option":""} {"type":"header2","title":"pdf document","text":"You can get a report with pdf format. ","code":"data2pdf(sampleData3)","option":"echo=TRUE,eval=FALSE"} {"type":"","title":"","text":"You can download sample data: [sampleData3.pdf](https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData3.pdf)","code":"data2pdf(sampleData2) ","option":"echo=TRUE,eval=FALSE"} {"type":"","title":"","text":"You can download sample data: [sampleData2.pdf](https://github.com/cardiomoon/rrtable/raw/master/inst/doc/sampleData2.pdf)","code":"","option":""}