Status: CLOSED

# Basics of R Programming: Part 2

##### Tuesday, August 9, 2011 10:00 AM - 12:00 PM

R is a powerful platform for statistics and graphics. Part 2 will focus on building complex graphics in R and basic statistics. R possess a wide range of graphic function that we will explore and use to build custom plots. Basic exploratory statistics often used in publications (interquartile range, linear regression, distributions) and graphical tools to represent them will be introduced.

#### Course Outline:

- Discovery the R console and RStudio interface
- Basic operation in R
- Imputing data
- Removing data
- The help function

- Data structures and data manipulation
- Vectors
- Matrices
- Data frames
- Lists
- Problems
- Using indexes to select data subset
- Displaying your data

- Import and export
- Importing / exporting text file (.txt, .csv...)
- Importing Excel (.xls, .xlsx)
- Importing from SAS, SPSS, STATA, Systat...
- Problems
- How to save a R object
- Editing an object with reshape

- Basic of programming concept with R
- Loops
- Conditional executions
- Problems
- The Fibonacci list
- Example of an R function

#### The lecture is based on the following books and websites:

- Official introduction: http://tiny.cc/uiyyz
- Good intro: http://tiny.cc/zxeet
- R seek: http://www.rseek.org/
- Book: Introductory Statistics with R from Peter Dalgaard http://tiny.cc/l45vn
- Wiki “R” book: http://en.wikibooks.org/wiki/R_Programming

#### Prequisites:

Students must have completed the instructions installing R on a Windows Machine or a Mac before taking this class.More Information: https://youtu.be/BsWY7uwbs70