A general restatement of the question
- In Windows 7/8 the package
nicePack
, included in the base install, is outdated.
- You update it with
update.packages()
or via the equivalent GUI menu.
- You get:
Warning: package 'nicePack' in library 'C:/Program Files/R/R-3.*.*/library" will not be updated
Potential causes
R is not very kind with Windows so it just says "will not be updated" and not something like "permission denied to C:/Program Files/R/...". Anyway you realise that R cannot write to C:/Program Files
and so restart it as Administrator and upgrade, but the problem persists!
If you check the personal package directory, where R is able to write, you see that the updated version of nicePack
is there. In Windows the directory is normally ~\R\win-library\x.y
or find it with Sys.getenv("R_LIBS_USER")
.
Probably the first time R, unable to write to R default directory, used the personal directory, so that there are two versions of nicePack
. The second time, despite the admin privileges, R finds the updated package version in the personal directory and it does not update the default directory.
May be that R says "warning" and not "error", because the package is installed in the personal directory, but an outdated version remains in the default library.
Solution
Delete nicePack
package directory in the personal library directory, restart as administrator and update again.
Opinions
I don't know if there is an actual bug in this behaviour, anyway more informative messages would for sure help the Windows user.
Perhaps the default library should be avoided in Windows, in favour of the personal. Many Windows applications use C:\ProgramData
or ~\AppData\Local
, writeable without special privileges.