  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 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:
>>
>> ?table
>>
>> ?factor
>>
>> iris1$Species <-factor(iris$Species) # removes "extraneous" levels
>
> And that was not what I meant to type. Meant for factor to be applied 
> to second dataframe.:
>
> iris1$Species <-factor(iris1$Species) # removes "extraneous" levels
>
>
>>
>>> -- 
>
> David Winsemius, MD
> West Hartford, CT
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra@uni-hamburg.de

**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php


	[[alternative HTML version deleted]]

