Q:

Mutate using R "%>% could not be found"

I am running Rstudio on my macbook Pro for a coursera course "learning to program with R"
I cant seem to figure out why the "mutate" function isnt working. 
I am using the following code. 
{r calc-total-bapt-vars-save}
arbuthnot <- arbuthnot %>%
  mutate(total = boys + girls)

I keep getting an error that "%>% could not be found. Am I missing something?

A:

Try:
install.packages("magrittr") 
install.packages("dplyr")

library("dplyr") 
library("magrittr")

mutate belongs to the dplyr library, while %>% (pipe) belongs to magrittr.

