I had difficulties running R CMD check and build on windows 7. The problem seems to be that the script creates folders to which nobody has any access permissions (not even read). So the script can not delete these folders or open files.
This worked for me: Go to the properties of the root folder of your R project (e.g. "D:\R"). Change the settings so that this folder and its sub-folders do not inherit permissions. I wanted to next remove the "system" user (but that happened by itself); and I added myself as a user (not sure if necessary, but that's what I did). You probably need admin privileges to do this. > sessionInfo() R version 2.9.1 (2009-06-26) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base > ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel