Closed eteitelbaum closed 4 years ago
It is most likely rmarkdown is installed in a folder that cannot be discovered by R-IDE. Try running .libPaths()
in RStudio and compare it with
OK, yes, R-IDE sees the common library but is missing the personal library. How do I add the path for the personal library so that R-IDE can see it?
Does the directory Sys.getenv(“R_LIBS_USER”)
exist ?
Yes, I get "C:/Users/emman/RLibrary/4.0"
when I type Sys.getenv("R_LIBS_USER")
, whereas the common library is "C:/Program Files/R/R-4.0.0/library"
. R-IDE is seeing the common library but not the user library, where rmarkdown
and languageserver
are both installed. I think I changed the path of the user library at one point because somehow it had been installed in "OneDrive."
I think I changed the path of the user library at one point because somehow it had been installed in "OneDrive."
That explains. The default user library is something like~/R/win-library/4.0
OK thanks. I take it that the quickest way to resolve this is to change the path of the user library back to the default and reinstall my R packages. In other words, there is no setting I can change to get R-IDE to recognize the new path?
It is not an R-IDE specific issue. It was caused by incorrect configuration of R_LIBS_USER
. You might either specify your user directory by using .libPath()
or specifying the environmental variable R_LIBS_USER
.
See R documentation: https://stat.ethz.ch/R-manual/R-devel/library/base/html/libPaths.html for more details.
Thank you. I set the R_LIBS_USER
variable to value of the new file path and everything is working now. There is a discussion of how to do it on stackoverflow in case other people find it useful: https://stackoverflow.com/questions/15170399/change-r-default-library-path-using-libpaths-in-rprofile-site-fails-to-work
Hi Randy,
When I hit "Render R Markdown" in R-IDE I get this message:
I can knit the document in RStudio so I know that rmarkdown is there and I can also render it using R-IDE on another machine with the exact same setup as this one (both are running Windows 10 and RStudio Desktop is selected in SendCode).
Thanks for any clues you might have.
-Emmanuel