Re: [R] Best Programming Practices regarding data frames

2012-08-02 Thread Jan T Kim
On Wed, Aug 01, 2012 at 05:13:01PM -0500, R. Michael Weylandt wrote: > On Wed, Aug 1, 2012 at 4:19 PM, Ramiro Barrantes > wrote: > > Hello, > > > > I come from using different programming languages (C++, Mathematica, Perl) > > but have been using R extensively for several months. I see the data

Re: [R] Best Programming Practices regarding data frames

2012-08-01 Thread R. Michael Weylandt
On Wed, Aug 1, 2012 at 4:19 PM, Ramiro Barrantes wrote: > Hello, > > I come from using different programming languages (C++, Mathematica, Perl) > but have been using R extensively for several months. I see the data frame > as a key piece of the language and wanted to inquire people's experience

Re: [R] Best Programming Practices regarding data frames

2012-08-01 Thread Jeff Newmiller
I think the vector is far more fundamental than the data frame. Most of the time I write functions that return vectors, even if my input is a data frame. If I need a large number of input vectors, I set up the input arguments to include a data frame and additional named parameters with defaults

Re: [R] Best Programming Practices regarding data frames

2012-08-01 Thread Bert Gunter
I have no answer to your question, but note: 1. You do not need to return a data frame at all, of course. Most functions do not -- e.g., say, lm() . 2. See ?with and ?within for perhaps relevant functionality. -- Bert On Wed, Aug 1, 2012 at 2:19 PM, Ramiro Barrantes wrote: > Hello, > > I come f

[R] Best Programming Practices regarding data frames

2012-08-01 Thread Ramiro Barrantes
Hello, I come from using different programming languages (C++, Mathematica, Perl) but have been using R extensively for several months. I see the data frame as a key piece of the language and wanted to inquire people's experience regarding its use. Say you have a data frame D D <- data.frame