This package was developed for the graduate student developed and led How to Learn to Code initiative at the University of North Carolina at Chapel Hill. It is intended to give a fundamentals-focused introduction to programming R.
To install the package from GitHub run:
library(devtools)
devtools::install_github("How-to-Learn-to-Code/rclass", build_opts = "", dependencies = TRUE)
library(htltcR)
Once the package is installed once, users can easily grab the most recent version by running updateRClass()
.
Each lecture is included in the package as a vignette. Once the package is installed and loaded (above), class lectures can be accessed with the vignette()
function. For example:
vignette("operators")
One of the biggest advantages of using a package is that students can easily load the data used in the examples and homeworks from the package. For example, to load the data used in control run:
data(primers)
The class is roughly intended for eight 90-minute sessions, ideally with the last 30 minutes reserved for students to ask questions and work collaboratively on the given exercises.
Class | Title | Command |
---|---|---|
Class 1 | HTLTC-R: Operators | vignette("operators") |
Class 2 | HTLTC-R: Data structures & subsetting | vignette("structures") |
Class 3 | HTLTC-R: Control statements | vignette("control") |
Class 4 | HTLTC-R: Functions | vignette("functions") |
Class 5 | HTLTC-R: Reading, writing, and regular expressions | vignette("io") |
Class 6 | HTLTC-R: Graphics | vignette("graphics") |
Class 7 | HTLTC-R: Graphics | vignette("graphics") |
Class 8 | HTLTC-R: Reproducible research & packages | vignette("package") |
This section contains recommendations for teachers from previous teachers. If you encounter something that you think could help other teachers, please add it here.
vignette("plotting")
. Read through both and use your discretion.See CONTRIBUTING.md for instructions.