Classes
Basics of R Programming: Part 1
This class will teach participants how to interact with R through the console. Interacting with R through the console is the prerequisite to start using higher functions provided within packages. Student in this first session will be introduced to basic R commands and help functions. We will review different data structures and how to manipulate them. Finally, we’ll learn how to write small instruction sets in R and build functions.
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
About the Instructor:
David Ruau; Postdoctoral Research fellow, Pediatrics - Please if you have questions about course content, etc.Prequisites:
Students must have completed the instructions installing R on a Windows Machine or a Mac before taking this class.