Unable to knit .Rmd to PDF and Word - With error message after running mutate()

Hi,
I am completely new to R markdown, but when I try to knit my code to a document I am receiving an error saying the mutate function cannot be found. When I run the line of code with that function it works. I also have dplyr installed and running. Can anyone help ?

Hi @ameli,

When a R Markdown document is knit, it runs the R code in a clean environment. So you need to include library(dplyr) inside the document itself so it gets loaded when being knit.

2 Likes

You can also run

library(tidyverse)

to load dplyr and other tools in a single package, as long as memory allocation isn't a priority

Thank you for your help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.