[R] Help with curr directory in R

Khanvilkar, Shashank skhanvil at qualcomm.com
Wed Nov 2 23:12:14 CET 2011

I think I have solved this problem
The issue was:
some user had changed the registry entry for 
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
(added Autorun and set it to C:\)

So the current dir was always pointing to C:\

I deleted that and everything works.


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Khanvilkar, Shashank
Sent: Wednesday, November 02, 2011 2:15 PM
To: R Mailing List
Subject: [R] Help with curr directory in R

Hello All
Thanks for all responses in advance,

I am invoking R from command line from C:\TEMP as

C:\Program Files\R\R-2.9.1\bin\R.exe --vanilla -f C:\temp\test.R

On two different machines
The test.R looks like:
print(c("CurrDir=", getwd()))


On one machine I get the currDir Correctly printed as C:/TEMP
But on another it gets printed as C:/

Does anyone know why this can be.. Is there some env variable that R is giving priority over current dir?


	[[alternative HTML version deleted]]

R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list