Install and familiarize yourself with the dplyr
package. The library()
step(s) should always be located at the very top of a script.
install.packages("dplyr")
library(dplyr)
help(package = dplyr)
This vignette is a great reference for data manipulation verbs to keep in mind.