m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--R.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/R.md b/R.md
new file mode 100644
index 0000000..07382bf
--- /dev/null
+++ b/R.md
@@ -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>
+ ```