diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-03-06 12:35:56 +0100 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-03-06 12:35:56 +0100 |
commit | 316487ffb821edf6cd3c47990a812972c0de84a5 (patch) | |
tree | fc9295827e048ea18d54f119d72e0b524f889b90 | |
parent | bce91cf81c954b4f3e520aef3a850417d7c58e42 (diff) |
Add R sheet
-rw-r--r-- | R.md | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -0,0 +1,31 @@ +# R and R Markdown + +## Installing packages + +In R shell: + + install.packages(<package name>) + +## Include a file + + source('<filename>') + +## Compiling R Markdown + + require(rmarkdown) + render('<filename>') # defaults to HTML + render('<filename>' output_format='pdf_document') + +## R Markdown + +Run R code: + + ```{r} + <code> + ``` + +Run code but don't show code block: + + ```{r, echo = False} + <code> + ``` |