Bill McNeill (UW)
2008-Dec-23 22:18 UTC
[R] How do I reload sessions from a non-default directory in OS X?
i use the GUI version of R on OS X. I launch it by double-clicking on the R icon. The process always starts in my home directory which means that the only .RData file that is ever read in is the one in my home directory. I would instead like to have different R sessions saved in different directories, but I can't figure out how to do this. A workaround is to use the shell version of R and always change to the directory containing my saved session before launching, but I prefer to use the GUI version. Is there a command to tell R to load a session from a particular location? How do other people with Macs do this? -- Bill McNeill http://staff.washington.edu/billmcn/index.shtml [[alternative HTML version deleted]]
David Winsemius
2008-Dec-24 03:02 UTC
[R] How do I reload sessions from a non-default directory in OS X?
On Dec 23, 2008, at 5:18 PM, Bill McNeill (UW) wrote:> i use the GUI version of R on OS X. I launch it by double-clicking > on the R > icon. The process always starts in my home directory which means > that the > only .RData file that is ever read in is the one in my home > directory. I > would instead like to have different R sessions saved in different > directories, but I can't figure out how to do this. > > A workaround is to use the shell version of R and always change to the > directory containing my saved session before launching, but I prefer > to use > the GUI version. > > Is there a command to tell R to load a session from a particular > location? > How do other people with Macs do this??load (It's not Mac-specific.) If you want to clean out the workspace you could use: rm( ls() ) You can also associate file types with your R.app. -- David Winsemius> > > -- > Bill McNeill > http://staff.washington.edu/billmcn/index.shtml > > [[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.
Charles C. Berry
2008-Dec-24 03:22 UTC
[R] How do I reload sessions from a non-default directory in OS X?
In the R for Mac OS X FAQ (available in the Help menu) see 4.5.4 Misc Menu and 4.5.5 Workspace Menu This is an R-sig-mac question, so posting there would have been preferred. Chuck On Tue, 23 Dec 2008, Bill McNeill (UW) wrote:> i use the GUI version of R on OS X. I launch it by double-clicking on the R > icon. The process always starts in my home directory which means that the > only .RData file that is ever read in is the one in my home directory. I > would instead like to have different R sessions saved in different > directories, but I can't figure out how to do this. > > A workaround is to use the shell version of R and always change to the > directory containing my saved session before launching, but I prefer to use > the GUI version. > > Is there a command to tell R to load a session from a particular location? > How do other people with Macs do this? > > -- > Bill McNeill > http://staff.washington.edu/billmcn/index.shtml > > [[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. >Charles C. Berry (858) 534-2098 Dept of Family/Preventive Medicine E mailto:cberry at tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
ronggui
2008-Dec-24 03:38 UTC
[R] How do I reload sessions from a non-default directory in OS X?
You can use setwd() to change the working directory. Merry X-mas On Wed, Dec 24, 2008 at 6:18 AM, Bill McNeill (UW) <billmcn at u.washington.edu> wrote:> i use the GUI version of R on OS X. I launch it by double-clicking on the R > icon. The process always starts in my home directory which means that the > only .RData file that is ever read in is the one in my home directory. I > would instead like to have different R sessions saved in different > directories, but I can't figure out how to do this. > > A workaround is to use the shell version of R and always change to the > directory containing my saved session before launching, but I prefer to use > the GUI version. > > Is there a command to tell R to load a session from a particular location? > How do other people with Macs do this? > > -- > Bill McNeill > http://staff.washington.edu/billmcn/index.shtml > > [[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. >-- HUANG Ronggui, Wincent Tel: (00852) 3442 3832 PhD Candidate, City University of Hong Kong Website: http://ronggui.huang.googlepages.com/ RQDA project: http://rqda.r-forge.r-project.org/