Rstudio will not knit

◇◆丶佛笑我妖孽 提交于 2020-01-30 10:56:17

问题


Rstudio will not knit. I have been using it for a few weeks in a course.

When I try to knit it executes until it comes to some code and it stops. The code is

ggplot(data = gss, aes(x = year, fill = degree)) + geom_bar()

The message is

could not find function "ggplot"

This happens with other functions as well. With the code commented out is will run and produce an HTML file.

I have reinstalled R and Rstudio twice. I have had difficulty with my AV software (Bitdefender) blocking the install of some of the apps. The software is a new version updated a couple of weeks ago.


回答1:


Please load the package in the document (R Markdown? You didn't say) before you use any functions in it, e.g., library(ggplot2).



来源:https://stackoverflow.com/questions/47685616/rstudio-will-not-knit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!