Weidong Gu uab.edu> writes:
>
> Try drop.levels in library gdata.
>
For what it's worth, adding a drop.levels (default FALSE)
to subset is a long-standing wish of mine -- I keep meaning
to put together a patch to do this. (This question comes
up about once a year on the R help list.) I loo
Lobo
Sent: Tuesday, April 01, 2008 3:26 AM
To: Stefan Grosse
Cc: r-help@r-project.org
Subject: Re: [R] Subset: data frames and factor levels
Thanks, problem solved thanks to your hints, but, within subset(),
drop=T still keeps
the unused levels (I'm using 2.6.1 on win).
Agus
Stefan Grosse esc
Thanks, problem solved thanks to your hints, but, within subset(),
drop=T still keeps
the unused levels (I'm using 2.6.1 on win).
Agus
Stefan Grosse escribió:
> On Tuesday 01 April 2008 09:43:00 am Agustin Lobo wrote:
> AL> I'm doing:
> AL> etni <- subset(etni, NAMECOM!="Maniquisito")
> AL>
> AL>
On Tuesday 01 April 2008 09:43:00 am Agustin Lobo wrote:
AL> I'm doing:
AL> etni <- subset(etni, NAMECOM!="Maniquisito")
AL>
AL> where etni is a data.frame, NAMECOM a factor and "Maniquisito" labels
AL> a row that I want to delete.
AL>
AL> The problem is that while the row is deleted, the factor le
Hi!
I'm doing:
etni <- subset(etni, NAMECOM!="Maniquisito")
where etni is a data.frame, NAMECOM a factor and "Maniquisito" labels
a row that I want to delete.
The problem is that while the row is deleted, the factor level is still
there (I can see "Maniquisito" if I do levels(etni$NAMECOM) ).
5 matches
Mail list logo