Jon Duan
Nov. 16 2015
Rworkshop Material, download Source code
Other options you can add to the tag
http://rmarkdown.rstudio.com/authoring_rcodechunks.html
| Option | Description |
|---|---|
| echo = TRUE or FALSE | to show or hide code. |
| eval = TRUE or FALSE | to run or skip the code. |
| warning = TRUE or FALSE | to show or hide function warnings. |
| message = TRUE or FALSE | to show or hide function R messages. |
| results = “hide” | will hide results. They will still be executed |
| fig.height = | Height of figure |
| fig.width = | width of figure |
http://ateucher.github.io/rcourse_site/basics.html
Understanding basic data types in R
R has 6 (although we will not discuss the raw class for this workshop) data types.
"a", "swc"2, 15.52L (the L tells R to store this as an integer)TRUE, FALSE1+4i (complex numbers with real and imaginary parts)x = 'hello, python world!'
print(x.split(' '))
['hello,', 'python', 'world!']
Error in (function (file = "", code = NULL, env = globalenv(), embeddedR = TRUE, :
Error 1 occurred building shared library.