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.