我正在制作R markdown脚本(RStudio)。单个代码块工作,但当我尝试编织到HTML时,它会引发错误,因为"库中的错误(dplyr):没有名为' dplyr'呼叫:... withCallingHandlers - > withVisible - > eval - > eval - >文库"
码
##install library
```{r install pkg,include=FALSE,cache=TRUE}
install.packages("kableExtra",repos = "http://cran.us.r-project.org")
install.packages("dplyr", repos = "http://cran.us.r-project.org")
install.packages("ggplot2", repos = "http://cran.us.r-project.org")
```
```{r setup, include=FALSE}
library(knitr)
library(dplyr)
library(ggplot2)
```
答案 0 :(得分:0)
重新启动R 您应该手动安装软件包,然后编织到HDML。单击工具>安装软件包,然后键入软件包