Using the R package rmarkdown
, Wallace allows the user to download the history of actions (and underlying code) run in the current session of Wallace. This includes the formats .Rmd (R Markdown), .pdf, .html, or .doc. The .Rmd format is an executable R script file that will reproduce the analysis if run in an R session. This file is composed of plain text and R code "chunks".
Extended functionality for R Markdown files exists in RStudio. Simply open the .Rmd in RStudio, click on "Run" in the upper-right corner, and run chunk by chunk or all at once. To learn more details, check out the RStudio tutorial.
To generate a PDF of your session code, it is essential you have a working version of TeX installed. For Mac OS, download MacTeX here. For Windows, please perform the following steps:
Sys.getenv("PATH")
in RStudio. This command returns the path where RStudio is trying to find pdflatex.exe. In Windows (64-bit), it should return C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe
. If pdflatex.exe is not located in this location, RStudio gives the error code "41".d <- "C:/Program Files/MiKTeX 2.9/miktex/bin/x64/"
Sys.setenv(PATH=paste(Sys.getenv("PATH"), d, sep=";"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.