rmarkdown::render('/Users/salemalshemmari/Desktop/AML_mutation 2/AML_mortality/ELN_AML.Rmd', encoding = 'UTF-8');
Error: could not find function "ggplot"
Execution halted
1 Like
You need to ensure that you have the ggplot2 library installed, and then add library(ggplot2)
to your document (in a code chunk).
I did this many times, the ggplot2 package is working well in the code chunk. I get this error only when knitting!!
Can you strip down the document to the bare minimum necessary to reproduce the error -- maybe plot something from one of the built in databases, so that we don't need your data -- and post that here?
That code works fine for me. I will note, though, that the listing does not included any calls to ggplot()
.
When rendering with the following command in the console: rmarkdown::render(“file name.Rmd”) it works well. But not with knit button!!