以下是我得到的错误:
Quitting from lines 46-48 (lesson3_student.rmd) Error in contrib.url(repos, "source") : trying to use CRAN without setting a mirror Calls: <Anonymous> ... withVisible -> eval -> eval -> install.packages -> contrib.url In addition: Warning message: In in_dir(opts_knit$get("root.dir") %n% input_dir(), evaluate::evaluate(code, : You changed the working directory to /Users/Madiyar/Desktop/Facebook Data (probably via setwd()). It will be restored to /Users/Madiyar/Downloads. See the Note section in ?knitr::knit Execution halted
感谢您的帮助
答案 0 :(得分:2)
这个错误对我来说似乎很清楚;你"trying to use CRAN without setting a mirror"
;问题是针织在非交互模式下运行。试试
options(repos="https://cran.rstudio.com" )
你的代码中的。我会说在编织代码中你应该不
install.packages()
(正如@hrbrmstr在评论中所说,&#34; [m] ost人们想要管理他们自己的软件包库&#34;)setwd()
手动设置工作目录