.. r basics Learning R ========================== Learning R can be a career long endeavor. The best advise is to use it every chance you get. And do not be afraid to ask questions-- R is a very common language and many people can help you. * Exit R -- Type ``q()`` * Get help -- ``?mean`` or ``help(mean)`` .. rubric:: predefined-variables .. code-block:: r print(pi) .. code-block:: none [1] "..." [1] 3.141593 Declaring variables. .. rubric:: other-varialbes .. code-block:: r print("I am a String") a <- 1:10 print(a) print(a>5) .. code-block:: none [1] "..." [1] "I am a String" [1] 1 2 3 4 5 6 7 8 9 10 [1] FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE 1. What does the command ``seq`` do? 2. Wha about :math:`1:10 + 5`? Resources ^^^^^^^^^^^^^^^^ * :download:`RQuickReference (pdf)<../RQuickReference.pdf>` - very handy summary of R functions by `Elizabeth Slate `_ * :download:`RBasics Part I (pdf)<../RBasics-I-v2.pdf>` - short course on R by `R. Montgomerie `_ * :download:`RBasics Part II (pdf)<../RBasics-II-v2.pdf>` - short course on R part II * An `R primer for introductory statistics `_