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.
Thanks
Shank
-----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:
--SNIP-
print(c("CurrDir=", getwd()))
proc.time()
warnings()
--SNIP-
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?
Thanks
Shank
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org 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.