1

Hello this is likely to be a silly question, sorry for that.

I want to change the library folder in Windows but I do not understand what is said in the cran website:

You may also want to add command-line arguments at the end of the Target field (after any final double quote, and separated by a space), for example --sdi --max-mem-size=1G. You can also set environment variables at the end of the Target field, for example R_LIBS=p:/myRlib, and if you want to ensure that menus and messages are in (American) English, LANGUAGE=en.

When I set the R_LIBS variable in R with R_LIBS="C:/R/i686-pc-linux-gnu-library/3.0" it doen't give any error but the folder path for the library does not change becuse when I type require(package) it is not found.

I saw this post and it says it can be due to the R.profile. I don't know how to deal with the error, should I just remove R and install it from the beginning?

Community
  • 1
  • 1
Irene
  • 744
  • 1
  • 12
  • 36
  • are you using an IDE such as RStudio or accessing R directly? (I have had similar problems on Windows but it was an RStudio problem) – joemienko Dec 07 '13 at 10:17
  • RStudio, thank you for your interest, agstudy's answer solved my problem. – Irene Dec 07 '13 at 17:05

1 Answers1

1

You should set the environment variable R_LIBS in Windows ( not within R) to something like

R_LIBS=C:/R/i686-pc-linux-gnu-library/3.0

Restart R.

Note to set the environment variable you can use setx command:

  1. Open a cmd console (command line console)
  2. setx R_LIBS %R_LIBS%;C:/R/i686-pc-linux-gnu-library/3.0;
agstudy
  • 119,832
  • 17
  • 199
  • 261