Hello, I'm having some difficulty understanding the documentation relative to the startup files with R-Aqua 2.0.1 for Mac OS X. Specifically, I'm wondering: where does R search for the startup files (my home directory at Users:<me>:?); how should they be named (.RProfile will be treated by Mac OS X as a system file and be hidden, so I'm wondering if it should just be RProfile)? I can't find this platform-specific information in any of the documentation. As a related issue, where would I store my home-grown functions? Would RProfile be a good place to keep them? Thank you, Tom
On Sun, 30 Jan 2005, Thomas Hopper wrote:> Hello, > > I'm having some difficulty understanding the documentation relative to the > startup files with R-Aqua 2.0.1 for Mac OS X. > > Specifically, I'm wondering: where does R search for the startup files (my > home directory at Users:<me>:?);Yes.> how should they be named (.RProfile will be > treated by Mac OS X as a system file and be hidden, so I'm wondering if it > should just be RProfile)?No, it should be .Rprofile> I can't find this platform-specific information in > any of the documentation.That's because it isn't actually platform-specific. OS X is like other Unix flavours in this respect.> As a related issue, where would I store my home-grown functions? Would > RProfile be a good place to keep them?Not especially, though there isn't anything really wrong with it. You could also save() them in a binary file and load that file in your .Rprofile, or put them in a package. Putting them in a package allows them to have documentation accessed with help(). Putting them in .Rprofile probably makes it harder to edit your functions, and it certainly makes it harder to separate functions for different purposes. -thomas
On Sun, 30 Jan 2005, Thomas Hopper wrote:> I'm having some difficulty understanding the documentation relative to > the startup files with R-Aqua 2.0.1 for Mac OS X. > > Specifically, I'm wondering: where does R search for the startup files > (my home directory at Users:<me>:?); how should they be named > (.RProfile will be treated by Mac OS X as a system file and be hidden, > so I'm wondering if it should just be RProfile)? I can't find this > platform-specific information in any of the documentation.Should be "$HOME/.Rprofile" for user-level default setting and will be hidden by Finder. It's not something you're going to be changing daily anyway and can be modified using TextWrangler's 'Open Hidden..." menu option by non-Terminal users. This is not platform-specific and is described in Appendix B of 'Introduction to R' (pg 85 of R-intro.pdf).> As a related issue, where would I store my home-grown functions? > Would .RProfile be a good place to keep them?I keep .First and .Last and a couple functions that pose as typing shortcuts in ".Rprofile". Anything else I source an external file.. Create a subdirectory under "~/Library/R" and store functions there if nowhere else makes sense. ---------------------------------------------------------- SIGSIG -- signature too long (core dumped)
Reasonably Related Threads
- .First and .Rprofile won't run on startup
- R's startup : .Rprofile & .Renviron -- info and RFC
- Using the Rprofile file to automatically plot data on Startup of R version 2.0.1.
- enableJIT in Rprofile leads to 'not a proper evaluation environment' on startup
- Websocket example out of the box failing if running at startup from Rprofile.site