The $HOME/R folder is applicable to more than just Rstudio—R as a whole uses it.
This change is what worked for me. Note: the article linked by the original message did not work; it may have been out of date.
--- /dev/null
+{
+ "name": "R",
+ "files": [
+ {
+ "path": "$HOME/R",
+ "movable": true,
+ "help": "Export the following environment variables:\n\n```bash\nexport R_LIBS_USER=\"$XDG_DATA_HOME\"/R/x86_64-pc-linux-gnu-library\n```\n\nAnd/or append this line to the end of `/usr/lib/R/library/base/R/Rprofile`:\n\n```R.libPaths( c( \"$XDG_DATA_HOME/R/x86_64-pc-linux-gnu-library/\" , .libPaths() ) )```\n\n**Disclaimer: You may need to re-install your libraries**"
+ }
+ ]
+}
+++ /dev/null
-{
- "name": "rstudio",
- "files": [
- {
- "path": "$HOME/R",
- "movable": true,
- "help": "Default directory location can be configured in RStudio\nReference: https://www.accelebrate.com/library/how-to-articles/r-rstudio-library"
- }
- ]
-}