libPaths('X://Users/username/R/win-library/X. Finally, I tried to move the personal library location to my users' directory. Removed the whole R\win-library tree and recreated it and nothing. I suspected of directory permissions, checked it within the directories' "properties" without luck. I was getting this same cannot open file error when trying to install or update packages, even when running as administrator. You can get the exact location on your machine with this command in the R console: Sys.getenv('R_LIBS_USER') Therefore, by default, the personal library location is under X:\\Users\username\Documents\R\win-library\X.Y\. This is because there is no concept of HOME in Windows, just of a "personal" directory (Documents): The default location for R's user "home" directory on Windows is X:\\Users\username\Documents. files from Documents to the user profile directory. Note: after this change, you may need to move your. Here is a nice guide of how to set environment variables in Windows. To make it permanent, I set a user environment variable R_USER to %USERPROFILE%. Other answers haven't worked.įor me, what solved the problem was to put the personal library directly under X:\\Users\username\ instead of under Documents, which is the R default on Windows. I don't know if the system itself processes its permissions differently or if antiviruses target operations inside this directory more strictly, but many R users have issues installing packages in the personal library inside this folder (even if running R as administrator). The "Documents" (or "My Documents") directory is a special location in Windows. I'm not sure if this missing folder is the issue, as the error says 'Permission denied', but it seems odd. file142032c9327b is now in the correct path, but path specified in the error is only correct up to /boost, there is no function folder here.? I have changed the directory/libpath as it did not appear that the file was downloading to the correct folder. >Error in install.packages : cannot open file '\\xxxxxxx.local/Desktops/jagnew/My Documents/R/win-library/3.3/file142032c9327b/BH/include/boost/function/detail/gen_maybe_': Permission denied This is the error: >Installing package into ‘\\xxxxxxxx.local/Desktops/jagnew/My Documents/R/win-library/3.3’Ĭontent type 'application/zip' length 16150075 bytes (15.4 MB)Ĭontent type 'application/zip' length 2556205 bytes (2.4 MB) It seems there are various parts to the install, some of these worked but the problem happens when I get 'the dependency BH'. here::here () always returns a full path, so this is one place here () isn't a good idea. The second step is to use a relative path to specify the location of the image instead of a full path. I have installed various other packages without problem but have hit a problem with this. The answer is first to place the image file in the same folder as your slides, or in a subdirectory of the folder containing your slides. I'm working in RStudio and am attempting to install the dplyr package.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |