Welcome to an interactive, week-long introduction to the programming language R!
R is a powerful, cross-platform, open-source, and free software that has been widely adopted across a number of science fields. While incredibly useful, it can also be daunting to learn. This course doesn’t require any prior programming experience. We’ll teach you the basics of R by writing code together and setting up our computers the same way you will to work on your own data after the workshop. By the end of the week, you’ll be able to input, organize, and summarize data in R. You’ll also learn how to visualize and present data using publication-quality plots and dynamic documents that combine descriptive writing with the results of your code. The course will focus on laying a groundwork of basic R skills to enable future self-teaching of specific use cases.
This instance of the course is being taught as a part of the Data Intensive Biology Summer Institute DIBSI using a Data Carpentry framework. We are located in Room 2030 of the Valley Hall teaching facility on the Health Sciences side of UC Davis main campus, in Davis, CA. (Google maps link).
Etherpad
We will use this Etherpad for chatting, taking notes, and sharing URLs and bits of code.
Live code
This is the live script file that we are generating throughout each day. Click “refresh” in your browser to see the latest saved version.
Feedback forms
These are generic Google Forms that we’ll use to get immediate feedback throughout the course.
Data Carpentry workshop surveys These pre- and post-workshop surveys help us ensure the effectiveness of our teaching methodology.
Data Carpentry’s teaching is hands-on, so participants are encouraged to use their own computers to ensure the proper setup of tools for an efficient workflow. These lessons assume no prior knowledge of the skills or tools, but working through this lesson requires working copies of R and RStudio. A working copy of a spreadsheet program is recommended, but not required. To most effectively use these materials, please make sure to download and install everything before working through this lesson. Participants are required to abide by Data Carpentry’s Code of Conduct.
R and RStudio are separate downloads and installations. R is the underlying statistical computing environment. RStudio is a graphical integrated development environment (IDE) that makes using R much easier and more interactive. You need to install R before you install RStudio.
sessionInfo()
, which will also display which version of R you are running. Go on the CRAN website and check whether a more recent version is available. If so, please download and install it. You can check here for more information on how to remove old versions from your system if you wish to do so..exe
file that was just downloadedsessionInfo()
, which will also display which version of R you are running. Go on the CRAN website and check whether a more recent version is available. If so, please download and install it..pkg
file for the latest R versionsudo apt-get install r-base
, and for Fedora sudo yum install R
), but we don’t recommend this approach as the versions provided by this are usually out of date. In any case, make sure you have at least R 3.3.1.sudo dpkg -i rstudio-x.yy.zzz-amd64.deb
at the terminal).To interact with spreadsheets, we can use LibreOffice, Microsoft Excel, Gnumeric, OpenOffice.org, or other programs. Commands may differ a bit between programs, but general ideas for thinking about spreadsheets are the same.
For this lesson, if you don’t have a spreadsheet program already, you can use LibreOffice. It’s a free, open source spreadsheet program.
These setup instructions are adapted from those written for Data Carpentry: R for Data Analysis and Visualization of Ecological Data and Data Carpentry: Data Organization in Spreadsheets.