[R] 1.8.1 and subsetting dataframes

Patrick Connolly p.connolly at hortresearch.co.nz
Mon Nov 24 23:51:48 CET 2003

On Mon, 24-Nov-2003 at 11:36PM +0100, Peter Dalgaard wrote:

|> Patrick Connolly <p.connolly at hortresearch.co.nz> writes:
|> > I've encountered something that didn't arise using earlier versions of
|> > R (Linux).
|> > 
|> > A dataframe is created and new columns added to it by doing
|> > calculations using apply with various functions on some of the
|> > original columns.  It's somewhat too involved to give a toy example
|> > that's reproducible.  
|> You can try harder, though. See below.

|> > PS: Is there a more elegant way using a text connection instead or
|> > creating a temporary file in my work around?
|> Not really. Shouldn't have to do it though. You probably want to put
|> an as.vector around those apply() calls instead.

What brilliant insight!  That's exactly what it needed.  Thanks for
the other suggestions, but they weren't necessary.

Things are *not* rotten in the state of Denmark.  


Patrick Connolly
Mt Albert
New Zealand 
Ph: +64-9 815 4200 x 7188
I have the world`s largest collection of seashells. I keep it on all
the beaches of the world ... Perhaps you`ve seen it.  ---Steven Wright 

More information about the R-help mailing list