Unable to Knit to html, Error in ggplot : could not find function "ggplot"; whereas ggplot2 is installed and selected. Is anyone facing similar issue with ggplot2 since yesterday?

Unable to Knit to html, getting the below error, any suggestions?

Quitting from lines 34-39
Error in ggplot(df, aes(x = age, fill = age)) :
could not find function "ggplot"
Calls: ... withVisible -> eval_with_user_handlers -> eval -> eval
Execution halted

When you knit an Rmd document the code gets executed in a clean environment other than the one you are currently working on, so you need to load all used libraries in the code itself, add library(ggplot2) to the beginning of your code.

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.