---
title: "sessionCode"
output: html_document
---

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](http://rmarkdown.rstudio.com/lesson-1.html).

#### Notes
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](http://www.tug.org/mactex/). For Windows, please perform the following steps:
  
1. Download and Install MiKTeX [here](http://miktex.org/2.9/setup/).
2. Run `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".
3. To set the path variable, run the following in RStudio:  
`d <- "C:/Program Files/MiKTeX 2.9/miktex/bin/x64/"`  
`Sys.setenv(PATH=paste(Sys.getenv("PATH"), d, sep=";"))`
