[R] Problem setting TMPDIR on the fly

From: Benjamin Lloyd-Hughes <Benjamin.Lloyd-Hughes_at_benfieldgroup.com>
Date: Mon 30 Oct 2006 - 16:22:07 GMT


Hi folks,  

I'm having a spot of bother with tempdir(). If I set the environment variable TMPDIR in my shell prior to invoking R it works as expected:  

> Sys.getenv("TMPDIR")

              TMPDIR "/eurotempest/tmp/R"

> tempdir()

[1] "/eurotempest/tmp/R/Rtmp0xY4XD"
 

However if I don't set it prior to entry, but attempt to set it from within the current session, the change is not detected/respected:  

> Sys.getenv("TMPDIR")

TMPDIR     ""

> Sys.putenv(TMPDIR = "/eurotempest/tmp/R/")

> Sys.getenv("TMPDIR")

               TMPDIR "/eurotempest/tmp/R/"

> tempdir()

[1] "/tmp/Rtmp9chsNX"
 

Any ideas?  

Cheers, Ben  

> R.Version()

$platform

[1] "i686-redhat-linux-gnu"

$arch

[1] "i686"

$os

[1] "linux-gnu"

$system

[1] "i686, linux-gnu"

$status

[1] ""

$major

[1] "2"

$minor

[1] "3.0"

$year

[1] "2006"

$month

[1] "04"

$day

[1] "24"

$`svn rev`

[1] "37909"

$language

[1] "R"

$version.string

[1] "Version 2.3.0 (2006-04-24)"
       



This e-mail and its contents are intended for the use of the addressee(s) and may be confidential/privileged. No-one else may review, copy, disclose or otherwise use it or its contents. If you receive this e-mail in error, please contact the originator and delete it as soon as possible. Benfield Limited is authorised by the Financial Services Authority under the reference number 311884. Registered in England no 1170753. Registered office 55 Bishopsgate.

Please refer to Benfield Limited's terms and conditions (www.benfieldgroup.com/terms) for a description of our services, duties and points of contact. Please review these terms and conditions at inception and renewal of all reinsurance and insurance contracts.

Please note that our terms and conditions and interests in other companies may change over time and these changes will be reflected on the Benfield Limited website. The latest version of our terms and conditions supersedes all previous versions.


        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Oct 31 03:34:59 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 30 Oct 2006 - 18:30:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.