Re: [R] removed data is still there!

2010-09-24 Thread Prof Brian Ripley
On Fri, 24 Sep 2010, Prof Brian Ripley wrote: On Thu, 23 Sep 2010, Peter Ehlers wrote: On 2010-09-21 5:51, Nikhil Kaza wrote: example(factor) iris1$Species<- factor(iris1$Species, drop=T) will get you what you need. Hmm, doesn't work for me. ?factor does not list a 'drop=' argument. I s

Re: [R] removed data is still there!

2010-09-23 Thread Prof Brian Ripley
On Thu, 23 Sep 2010, Peter Ehlers wrote: On 2010-09-21 5:51, Nikhil Kaza wrote: example(factor) iris1$Species<- factor(iris1$Species, drop=T) will get you what you need. Hmm, doesn't work for me. ?factor does not list a 'drop=' argument. I suspect iris1$Species <- [iris1$Species, drop=TR

Re: [R] removed data is still there!

2010-09-23 Thread Peter Ehlers
On 2010-09-21 5:51, Nikhil Kaza wrote: example(factor) iris1$Species<- factor(iris1$Species, drop=T) will get you what you need. Hmm, doesn't work for me. ?factor does not list a 'drop=' argument. -Peter Ehlers Nikhil Kaza Asst. Professor, City and Regional Planning University of North

Re: [R] removed data is still there!

2010-09-22 Thread Ivan Calandra
Hi, I agree with you that levels should not be automatically dropped after subsetting. However, I think there should/can be an extra argument to make it possible (the default being no dropping). I have no example in mind, but I guess it is possible that sometimes, one want to show only some

Re: [R] removed data is still there!

2010-09-21 Thread Greg Snow
1.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Ivan Calandra > Sent: Tuesday, September 21, 2010 7:23 AM > To: r-help@r-project.org > Subject: Re: [R] removed data is still there! > > Hi, &g

Re: [R] removed data is still there!

2010-09-21 Thread Ben Bolker
Ivan Calandra uni-hamburg.de> writes: > > Hi, > > I knew about that way already, with factor(). Isn't there another > possibility, directly at the subsetting step? That would be of great help > iris1 <- iris[iris$Species == 'setosa',] ## I mean here > > Ivan Not as far as I know. See

Re: [R] removed data is still there!

2010-09-21 Thread Ivan Calandra
Hi, I knew about that way already, with factor(). Isn't there another possibility, directly at the subsetting step? That would be of great help iris1 <- iris[iris$Species == 'setosa',] ## I mean here Ivan Le 9/21/2010 15:14, David Winsemius a écrit : > > On Sep 21, 2010, at 9:04 AM, David

Re: [R] removed data is still there!

2010-09-21 Thread David Winsemius
On Sep 21, 2010, at 9:04 AM, David Winsemius wrote: On Sep 21, 2010, at 8:39 AM, pdb wrote: Thanks, but that was what I just discovered myself the hard way. What I really wanted to know was how to solve this issue. Although that was _not_ what you requested in your first post. 2 options

Re: [R] removed data is still there!

2010-09-21 Thread David Winsemius
On Sep 21, 2010, at 8:39 AM, pdb wrote: Thanks, but that was what I just discovered myself the hard way. What I really wanted to know was how to solve this issue. Although that was _not_ what you requested in your first post. 2 options: ?table ?factor iris1$Species <-factor(iris$Species

Re: [R] removed data is still there!

2010-09-21 Thread pdb
Thanks, but that was what I just discovered myself the hard way. What I really wanted to know was how to solve this issue. -- View this message in context: http://r.789695.n4.nabble.com/removed-data-is-still-there-tp2548440p2548527.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] removed data is still there!

2010-09-21 Thread ONKELINX, Thierry
Removing elements from a factor does not change the levels of the factor. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie & Kwaliteitszorg Gaverstraat 4 9500 Geraardsbergen Belgium Research In

Re: [R] removed data is still there!

2010-09-21 Thread Nikhil Kaza
example(factor) iris1$Species <- factor(iris1$Species, drop=T) will get you what you need. Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina nikhil.l...@gmail.com On Sep 21, 2010, at 7:41 AM, pdb wrote: I'm confused, hope someone can point out what is no