The goals of this lesson are 1) to teach novice programmers to write modular code and best practices for using R for data analysis, and 2) to teach novice programmers how to modify scripts to accomodate their own data.
R is commonly used in many scientific disciplines for statistical analysis and its array of third-party packages. The emphasis of these materials is to give attendees a strong foundation in the fundamentals of R, and to teach best practices for scientific computing: breaking down analyses into modular units, task automation, and encapsulation.
Note that this course will focus on teaching the fundamentals of the programming language R and will not teach statistical or bioinformatic analysis. A variety of third party packages will be used, chosen primarily for their usability and not necessarily because they are the best or most comprehensive.
These lesson materials are adapted from the R-novice-gapminder materials and the DESeq2 manual.
Learning objectives:
- To gain familiarity working in the RStudio enviornment
- To understand variables and how to assign to them
- To be able to use mathematical and comparison operations
- To be able to call functions
- To work with R libraries and modify scripts to accomodate your data
- Introduction to R and RStudio
- Best Practices
- Seeking help
- Data structures and Data Frames
- Plotting
- Subsetting
- dplyr
- DESeq2
Click the green "Clone or Download" button. We will discuss in the class the difference between clone and download. Once we decide what's appropriate, save it to your desktop.
- Check out Google's R Style Guide for best practices in writing R code.
- Check out The Hitchhiker's Guide to the Hadleyverse for a comprehensive listing of all the packages Hadley Wickham, Chief Scientist at RStudio) has contributed to.
- Check out these beautiful RStudio Cheatsheets for examples of how to use a variety of RStudio packages.