Skip to content
Prev 39272 / 63424 Next

Ignoring .Rprofile when installing a package

Jon,

I have had a similar problem when installing librarys. I have written a 
script which uses biocLite to install librarys.
I have included the following code which hides .Rprofile by renaming it 
and then renaming it back again after it has finished.

#Hide .Rprofile whilst this script is running.
file.rename(paste(Sys.getenv("HOME"),".Rprofile",sep=.Platform$file.sep),paste(Sys.getenv("HOME"),".Rprofile_hiding",sep=.Platform$file.sep))
# ...
# ... install libraries code
# ...
#Put .Rprofile back
file.rename(paste(Sys.getenv("HOME"),".Rprofile_hiding",sep=.Platform$file.sep),paste(Sys.getenv("HOME"),".Rprofile",sep=.Platform$file.sep))

I think this should be platform independent, but have mainly tried it on 
Windows and Unix.

cheers,

Keith Satterley,
On 18/02/2011 11:12 PM, Jon Clayden wrote:
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}