Reposted from https://rpubs.com/tbrambor/week2_example
R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
speed dist
Min. : 4.0 Min. : 2.00
1st Qu.:12.0 1st Qu.: 26.00
Median :15.0 Median : 36.00
Mean :15.4 Mean : 42.98
3rd Qu.:19.0 3rd Qu.: 56.00
Max. :25.0 Max. :120.00
Including Plots
You can also embed plots, for example:
Note that the echo = FALSE
parameter was added to the code chunk to prevent printing of the R code that generated the plot.
In-line Latex and R code
You can convert the temperature unit from Kelvin to Celsius with the formula
celsius=kelvin−273.15 And you can convert the result to Fahrenheit with the formula
fahrenheit=celsius×95+32
For example, degrees Kelvin corresponds to 9 degrees Celsius.
Interactive Visualizations
We can use interactive features as well. Let’s load the required packages first.
Running Code
One of the goals of the notebook is to provide a seamless environment for interacting with R – that is, you shouldn’t need to reach for the console, even though chunks send code there. To help you see the progress of your chunk – that is, which lines have been executed and which haven’t – RStudio draws an indicator in the editor gutter. Try running this chunk:
[1] 0.3300791 0.3204190 0.1840232
[1] 0.03274415 0.87292708 0.17402685
[1] 0.4474329 0.6614034 0.6329907
[1] 0.1356127 0.3566102 0.5274826
[1] 0.2410711 0.3946971 0.5203213
Errors
Sometimes your code will generate errors. Here’s an example:
cannot open file 'missing.R': No such file or directoryError in file(filename, "r", encoding = encoding) :
cannot open the connection
Notice that the line that caused the error is highlighted, and you can see the error’s traceback, just as you can in the RStudio console. If an error occurs while you’re running chunks, the error will cause the notebook to stop running, and the cursor will scroll to the point where the error occurred.
R Notebooks
This file is a R Notebook. It is a great way to share your analysis with others because it contains both the html output as well as the .Rmd file with the script to generate that output.
Saving and Sharing
A notebook’s source code is always in an .Rmd
file. Whenever you save it, a sidecar .nb.html
file is generated. This file contains a rendered copy of the notebook itself. No special viewer is required.
It also contains a copy of the notebook’s source .Rmd
file.
To look at the .nb.html
file, click Preview in the RStudio editor toolbar. This is a fundamental difference between notebooks and other R Markdown documents; pressing this button doesn’t actually cause any of your code to run, it just shows you the HTML file already prepared. It will automatically update whenever you save the .Rmd
file.
If you open the .nb.html
file in a web browser, you’ll see an option to download the source. You can also open an .nb.html
file in RStudio; when you do this, RStudio will automatically extract the .Rmd
file and outputs inside it and open the file in the notebook editor.
Notebooks as R Markdown Documents
A notebook is also an R Markdown document. Try changing the YAML header in this document so that html_document
is the first option, then clicking Knit
(or just pulling down the Preview) menu. You could also create a PDF from the notebook, a Word document, or even a dashboard.
Publishing
The notebook output is a html file with is easily shareable and can be open in any modern browser - so no R Studio required on the receiving end. R Studio also offers a service called RPubs which let’s you publish documents (and shiny apps) so you can share them with others via a link.
To do so, click the publish button in RStudio and enter a few things (like title and description) to publish the document (and make it publicly available). You need to sign up for RPubs beforehand to be able to do this quickly.
Specify knitr and pandoc options
Each R Markdown output template is a collection of knitr and pandoc options. You can customize your output by overwriting the default options that come with the template.
For example, the YAML header below overwrites the default code highlight style of the pdf_document template to create a document that uses the zenburn style:
---
title: "Demo"
output:
pdf_document:
highlight: zenburn
---
The YAML header below overwrites the default bootstrap CSS theme of the html_document template.
---
title: "Demo"
output:
html_document:
theme: spacelab
---
Brand your reports with style sheets
Above, I discussed a way to change the CSS style of your HTML output: you can set the theme option of html_document to one of default, cerulean, journal, flatly, readable, spacelab, united, or cosmo. (Try it out).
But what if you want to customize your CSS in more specific ways? You can do this by writing a .css file for your report and saving it in the same directory as the .Rmd file. To have your report use the CSS, set the css option of html_document to the file name, like this
Custom CSS is an easy way to add branding to your reports. The exercise folder contains a file called faded.css
. Try out to change the appearance of your html output.
LS0tCnRpdGxlOiAiRXhhbXBsZSBSZXBvcnQiCmF1dGhvcjogIlRob21hcyBCcmFtYm9yIgpkYXRlOiAnMjAxOC0wOS0xNycKb3V0cHV0OgogIGh0bWxfbm90ZWJvb2s6CiAgICB0b2M6IHllcwogIGh0bWxfZG9jdW1lbn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