Hello everyone, Can someone point me to some resources on managing data in R and/or S-plus? I have started using R more and more often in my work and I really like it. But, managing data is very different in R and S-Plus than in other packages that I am accustomed to. I know that it is an option to use different workspaces for different projects or to store all objects as source and read them in each session. I am looking for an overview of these data management options and tips / suggestions for handling multiple R projects efficiently. I have learned a lot through trial and error, but I am sure there are some better options. I want to avoid doing silly things like overwriting a local object by running a piece of example code that happens to have the same variable name! I looked in R-intro, but the information there is pretty basic. Any ideas? Thanks, Brett Magill magillb at usa.redcross.org Research and Program Development Health, Safety, and Community Services American National Red Cross -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
See the section "Operating in S" in http://hesweb1.med.virginia.edu/biostat/s/doc/splus.pdf Frank Harrell On Fri, 8 Feb 2002 11:42:52 -0500 "Magill, Brett" <MagillB at usa.redcross.org> wrote:> Hello everyone, > > Can someone point me to some resources on managing data in R and/or S-plus? > > I have started using R more and more often in my work and I really like it. > But, managing data is very different in R and S-Plus than in other packages > that I am accustomed to. I know that it is an option to use different > workspaces for different projects or to store all objects as source and read > them in each session. > > I am looking for an overview of these data management options and tips / > suggestions for handling multiple R projects efficiently. I have learned a > lot through trial and error, but I am sure there are some better options. > > I want to avoid doing silly things like overwriting a local object by > running a piece of example code that happens to have the same variable name! > I looked in R-intro, but the information there is pretty basic. Any ideas? > > Thanks, > > Brett Magill > > magillb at usa.redcross.org > Research and Program Development > Health, Safety, and Community Services > American National Red Cross > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-- Frank E Harrell Jr Prof. of Biostatistics & Statistics Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
It is hard to know what kind of projects you have, but one approach, among many, is outlined in the beginning of http://www.psych.upenn.edu/~baron/rpsych.htm It involves keeping raw data in separate files, each with a name (supposedly a useful mnemonic), such as cba1.data, and scripts in other separate files, such as cba1.R. The script cba1.R has something like read.table("cba1.data") as its first line, and it contains all the useful transformations and analyses (some commented out) discovered so far. I do not use the files that R stores at all. Rather, I edit the ..R file with ESS (which allows me to go back and forth to R itself). As I say, this is one approach among many. I think R has many tools that can help develop alternative approaches, such as setwd() for changing directories. For editing data I use (X)emacs, but you could also use a spreadsheet, or something fancier, or R itself, with the write() command for saving what you've edited. Jon Baron -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._