Re: [R] Subset: data frames and factor levels

From: Agustin Lobo <>
Date: Tue, 01 Apr 2008 10:26:11 +0200

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> 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 level is still
> AL> there (I can see "Maniquisito" if I do levels(etni$NAMECOM) ).
> See
> Stefan

Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Tel. 34 934095410
Fax. 34 934110012

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 01 Apr 2008 - 08:34:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 Apr 2008 - 13:30:24 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive