Re: [Rd] PR#6614

2006-02-27 Thread Peter Dalgaard
Bill Dunlap <[EMAIL PROTECTED]> writes: > On Wed, 23 Feb 2006, Peter Dalgaard wrote: > > > "Gabor Grothendieck" <[EMAIL PROTECTED]> writes: > > > > > Try this: > > > > > > subset(iris, select = - Species) > > > > Or, canonically, > > > > nm <- names(iris) > > iris[, nm != "Species" ] > > > > iri

Re: [Rd] PR#6614

2006-02-27 Thread David Hugh-Jones
One thing I notice is that after using subset() on a data frame imported from SPSS, my variable.names attribute disappeared. I guess what I would expect is for a subset() method always to preserve everything but the omitted column. Cheers David On 27/02/06, Bill Dunlap <[EMAIL PROTECTED]> wrote:

Re: [Rd] PR#6614

2006-02-27 Thread Bill Dunlap
On Wed, 23 Feb 2006, Peter Dalgaard wrote: > "Gabor Grothendieck" <[EMAIL PROTECTED]> writes: > > > Try this: > > > > subset(iris, select = - Species) > > Or, canonically, > > nm <- names(iris) > iris[, nm != "Species" ] > > iris[, -match("Species", nm)] > > > > > On 2/22/06, [EMAIL PROTECTED] <[

Re: [Rd] PR#6614

2006-02-22 Thread Peter Dalgaard
"Gabor Grothendieck" <[EMAIL PROTECTED]> writes: > Try this: > > subset(iris, select = - Species) Or, canonically, nm <- names(iris) iris[, nm != "Species" ] iris[, -match("Species", nm)] > > On 2/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I agree with the submitter that this

Re: [Rd] PR#6614

2006-02-22 Thread Gabor Grothendieck
Try this: subset(iris, select = - Species) On 2/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I agree with the submitter that this needs some kind of solution. > Although data.frame[,-12] works, how do I drop a named column (the > most common use case)? (I found this bug while searching

[Rd] PR#6614

2006-02-22 Thread davidhughjones
I agree with the submitter that this needs some kind of solution. Although data.frame[,-12] works, how do I drop a named column (the most common use case)? (I found this bug while searching for an answer.) cheers David __ R-devel@r-project.org mailing l