Cannot download packages for Knit

I tried to knit my file to pdf but I cannot download the required packages. Any advice woill be appreciated!

** Installing R Package Dependencies for R Markdown: 'Rcpp', 'base64enc', 'digest', 'evaluate', 'glue', 'highr', 'htmltools', 'jsonlite', 'knitr', 'magrittr', 'markdown', 'mime', 'rmarkdown', 'rprojroot', 'stringi', 'stringr', 'tinytex', 'xfun', 'yaml'

[1/21] Installing Rcpp...

Warning in utils::install.packages("Rcpp", repos = "https://cran.rstudio.com/") :
'lib = "C:/Program Files/R/R-4.0.2/library"' is not writable
Error in utils::install.packages("Rcpp", repos = "https://cran.rstudio.com/") :
unable to install packages
Calls: sourceWithProgress -> eval -> eval ->
ִֹͣ��

You have to run Rstudio as administrator to be able to install on this folder

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.