4

I am very new to R, but I can't get going because I keep having the same problem loading packages. I install the package and then go to load it and this is what happens:

> chooseCRANmirror()
> install.packages("psych")
trying URL 'http://cran.mtu.edu/bin/windows/contrib/3.0/psych_1.3.10.12.zip'
Content type 'application/zip' length 2684126 bytes (2.6 Mb)
opened URL
downloaded 2.6 Mb

package ‘psych’ successfully unpacked and MD5 sums checked
Warning: unable to move temporary installation ‘C:\Program Files\R\R-3.0.1\library\filedc04ebd378e\psych’ to ‘C:\Program Files\R\R-3.0.1\library\psych’

The downloaded binary packages are in
        C:\Documents and Settings\rbrown\Local Settings\Temp\RtmpcVNWuA\downloaded_packages

> library("psych")
Error in library("psych") : there is no package called ‘psych’

Please help.

Thomas
  • 43,637
  • 12
  • 109
  • 140
rob brown
  • 41
  • 1
  • 1
  • 2
  • 2
    it looks like you may not have permissions on the system -- are you able to create files in `C:\Program Files\R\R-3.0.1\library\psych` (using the same user that you use to run `R` under) – Ricardo Saporta Oct 22 '13 at 20:06
  • 2
    Run R as an administrator (right click the icon and it should be an option on the pop-up context menu) then repeat your code. – Thomas Oct 22 '13 at 20:27
  • There can be multiple user Libraries. Define one in your C:\Documents and Settings\rbrown\ directory. `?.libPaths` – IRTFM Oct 23 '13 at 07:47

1 Answers1

0

BY THE WAY I AM PASTING THE ANSWER I FOUND ON NET HERE AND IT WORKED FOR ME

Just to update everyone, I (think that I) found out the source of the problem: antivirus.

The "real time file system protection" was blocking R from copying the files between folders once they were downloaded. Upon adding the R directory to the exception list (coupled with adding user permission and installing R on D:\R), and the problem went away. With all of this work, I might as well went to Linux (I should, really...

Koundy
  • 5,265
  • 3
  • 24
  • 37