[R] Dropping columns from data frame

2012-01-06 Thread Mike Harwood
How does R do it, and should I ever be worried? I always remove columns by index, and it works exactly as I would naively expect - but HOW? The second illustration, which deletes non contiguous columns, represents what I do all the time and have some trepidation about because I don't know the

Re: [R] Dropping columns from data frame

2012-01-06 Thread David Winsemius
On Jan 6, 2012, at 10:00 AM, Mike Harwood wrote: How does R do it, and should I ever be worried? I always remove columns by index, and it works exactly as I would naively expect - but HOW? The second illustration, which deletes non contiguous columns, represents what I do all the time and

Re: [R] Dropping columns from data frame

2012-01-06 Thread Mike Harwood
Thank you, David. I was merely using head to limit the code/ output. My question remains, because a created data frame has the same columns as was output from head: head(orig.df,3) num1.10 num11.20 lc1.10 lc11.20 uc1.10 uc11.20 1 1 11 a k A K 2 2

Re: [R] Dropping columns from data frame

2012-01-06 Thread Sarah Goslee
On Fri, Jan 6, 2012 at 10:00 AM, Mike Harwood harwood...@gmail.com wrote: How does R do it, and should I ever be worried? You should be worried, but not about that.  I always remove columns by index, and it works exactly as I would naively expect - but HOW?  The second illustration, which

Re: [R] Dropping columns from data frame

2012-01-06 Thread David Winsemius
On Jan 6, 2012, at 11:43 AM, Mike Harwood wrote: Thank you, David. I was merely using head to limit the code/ output. My question remains, because a created data frame has the same columns as was output from head: head(orig.df,3) num1.10 num11.20 lc1.10 lc11.20 uc1.10 uc11.20 1 1