Working directory

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Working directory

jalanthomas@verizon.net
I am not experienced at R but have searched the manuals. . . .

I have tried placing a setwd command in the Rprofile.site and Rprofile files.  But it does not seem to work.  It always reverts to a particular directory I have been using (saved in workspace image?) for a while.  However, I can print out text from thr Rprofile files!

Could this be an issue with confilcts between my workspace/ session and my startup files?

I am running R version 2.13.1 on Windows 7.

Thanks, Alan


        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Working directory

Uwe Ligges-3


On 22.05.2012 20:28, [hidden email] wrote:
> I am not experienced at R but have searched the manuals. . . .
>
> I have tried placing a setwd command in the Rprofile.site and Rprofile files.  But it does not seem to work.  It always reverts to a particular directory I have been using (saved in workspace image?) for a while.  However, I can print out text from thr Rprofile files!
>
> Could this be an issue with confilcts between my workspace/ session and my startup files?

Works for me.

I guess you either specified an invalid directory or you do not have
permissions to change to it or you overwrite the setting later on in
another startup file?
What is your actual call? Does it work in an interactive R session?


> I am running R version 2.13.1 on Windows 7.

... which is outdated. I tested on R-release.

Uwe Ligges



> Thanks, Alan
>
>
> [[alternative HTML version deleted]]
>
>
>
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Working directory

jalanthomas@verizon.net
In reply to this post by jalanthomas@verizon.net
I have R installed at c:/.  In Rprofile.site I have added the following function:

.First <- function()
{
   setwd("c:/Users/little/Documents")
   cat("\nRprofile.site --- Welcome at", date(), "\n")
}

However, I have discovered that the cat statement is not printing out, so there must be another file kicking in somewhere.  I searched for all the Rprofile.* files but no luck.


        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Working directory

jalanthomas@verizon.net
In reply to this post by jalanthomas@verizon.net
I renamed all the .RData and .Rhistory files I could find, and then things started working.


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.