- 42 Views
- Uploaded on
- Presentation posted in: General

Download Presentation
## PowerPoint Slideshow about 'Programming in R ' - sheri

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Resources

- The Website has links to three programming tutorials.
- http://zoonek2.free.fr/UNIX/48_R/02.html is accessible.
- http://cran.r-project.org/doc/manuals/R-intro.html provides examples to work through.
- Lumley’s course http://faculty.washington.edu/tlumley/Rcourse/ is also good.

- Work through the tutorial you find easiest.

What is R?

- Statisticians use R to analyze data stored in objects that look like spreadsheets—data frames. You can think of R as spreadsheet scripting on steroids.
- R is a functional language like Lisp, Python, or OCaML. (See http://en.wikipedia.org/wiki/Functional_programming.)
- Specifically, functions in functional languages lack side-effects.
- Eternal Flame by Bob Kanefsky and sung by Julia Ecklar (about Lisp, another functional language):

Learning R

- Start R
- We will work through some examples of R code from chapters 1 and 6 and Appendix E of Verzani’sUsing R for Introductory Statistics.
- Afterwards, we’ll dip into the Zoonek programming tutorial (the second one). It has a bit more depth.

Use a Notes File

- Open a new document and type the following into it:
- # Notes
- mean(rnorm(10))
- # To execute a selection in Windows, select it and type ctrl-R.
- # In Mac OS, do the same, but type cmd-return instead.
- # To source the entire edit file, use ctrl-E or cmd-E.
- # The Windows FAQ is here: http://cran.r-project.org/bin/windows/base/rw-FAQ.html

- Try ctrl-R on the contents and look at your command window.
- I will now demonstrate a number of features of R. Take good notes!