1

So I do not have permission to add packages to where R stores it's libraries and was wondering if there was a way to add the package to my local directory (say my desktop) and then to run it using R. I tried the following but it failed because it couldn't locate lgfortan

install.packages("tgp",lib="/home/bps/Desktop/")

Typically the package would be installed into the default directory but that is not an option here for me since I don't have permission to add directories. Any suggestions are greatly appreciated!

3
  • R packages without external library dependencies should install in a local directory automatically if you don't have permissions for the system one. You'll need to be able to place gfortran (et al) into a local directory and ensure your PATH can get to them (and, for some compilations, specify directories for modules & libraries manually or in environment variables. You could also give packrat a go (provided you can install it :-) since it will help keep all dependencies local to your projects.
    – hrbrmstr
    Commented Aug 14, 2014 at 19:37
  • @hrbmstr isn't it possible to overcome this by somehow setting some flags like configure? I don't know how to do it and if tgp allows for it, but I think it may be possible (?)
    – konvas
    Commented Aug 14, 2014 at 19:41
  • Use .libPaths(). Then R will "know" where to look. And I think this is a duplicate question.
    – IRTFM
    Commented Aug 14, 2014 at 20:15

0

Browse other questions tagged or ask your own question.