Hello, I am supernew to R. I wanted to open an RMarkdown file, but first I was prompted to run an update. THis is the error message:
Installing 'markdown' for R Markdown...
Installing package into 'C:/Users/ab1715/Dropbox/PC/Documents/R/win-library/4.1'
(as 'lib' is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/markdown_1.1.zip '
Content type 'application/zip' length 188691 bytes (184 KB)
downloaded 184 KB
package 'markdown' successfully unpacked and MD5 sums checked
Error in unpackPkgZip(foundpkgs[okp, 2L], foundpkgs[okp, 1L], lib, libs_only, :
ERROR: failed to lock directory 'C:\Users\ab1715\Dropbox\PC\Documents\R\win-library\4.1' for modifying
Try removing 'C:\Users\ab1715\Dropbox\PC\Documents\R\win-library\4.1/00LOCK'
Calls: sourceWithProgress ... eval -> -> .install.winbinary -> unpackPkgZip
Execution halted
Any help welcome!
Alberto
R has problems with cloud-synced folders (Dropbox in your case), I recommend you to set your package library in a non-synced folder.
You can change the default library folder by setting your R_LIBS_SITE
environmental variable in a .Reviron or .Rprofile file. For example:
# In a .Renviron file you can set it by adding a line like this one with the desired location
R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.2\\library"
For a more detailed explanation, you can read this blog post
2 Likes
Thank you Andres, yes that was the reason --- solved,
best, Alberto
cderv
April 21, 2022, 9:40am
4
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:
If your question has been answered, don't forget to mark the solution!
How do I mark a solution?
Find the reply you want to mark as the solution and look for the row of small gray icons at the bottom of that reply. Click the one that looks like a box with a checkmark in it:
[image]
Hovering over the mark solution button shows the label, "Select if this reply solves the problem". If you don't see the mark solution button, try clicking the three dots button ( ••• ) to expand the full set of options.
When a solution is chosen, the icon turns green and the hover label changes to: "Unselect if this reply no longer solves the problem". Success!
[solution_reply_author]
…
system
Closed
April 28, 2022, 9:40am
5
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.