R resources
The class assumes some basic programming knowledge. At the beginning of the semesters, students will be expected to go through an Lab 0 to ensure that they are familiar with basic R Commands. This lab also helps students who have learned Python in Data 8 to transition to R.
Using R
We will have students interact with R via RStudio. Downloading RStudio onto your own computer and editing files locally is the most popular way to do assignments, if your computer is capable of doing this.
If you have a Chromebook or no laptop, or prefer to be able to work online on different machines you can alternatively use the online R hub environment for using RStudio. Working on the server also allows you to easily move between machines since you can access it online.
This is like the difference between working on Word on your computer versus google docs online, with the important distinction that the files you create either way are exactly the same. Be sure to download any file you are editing to your machine before you quit a online hub session if you want to open the file on the RStudio program that is on your machine!
Which server to use
For labs, we will be using a R hub for the labs that you can get access to only via Bcourses. Access to this hub will end at the end of the semester, along with access to your files. There are R hubs that everyone with a Berkeley Cal Net Id can have access to – you will use one in Lab 0 – that you will continue to be able to access after the course ends. If you want to work in the cloud and keep access to those files after the course ends, you should probably do assignments (other than the labs) in this public hub, which can be accessed at (r.datahub.berkeley.edu).
Useful online materials
The following quick references and tutorials for working with R may be helpful:
- Summary of R commands: A html summary of some useful commands (kept moderately up-to-date with commands from the class)
- Relationship of python to R commands: A summary relating important commands in python and R
- Base R cheat sheet from RStudio
- Longer R cheat sheet from CRAN
- Writing Functions: A tutorial with tips for writing functions
- Google search to answer questions about specific functions / packages.
Book length, more complete coverage:
- Official tutorial from CRAN
- R for beginners by Emmanuel Paradis
- Learning R by Richard Cotton available online through UC Berkeley
- R in a nutshell by Joseph Adler
- Hands-On Programming with R by Garrett Grolemund
- Advanced R by Hadley for those who go far in R, or have serious programming background in another language and want serious understanding.
There are many more options! If you find a particularly good one for this class that isn’t on the list, let me know.