Yes, same way. I had been battling before and then solved it between my post
and your response.
ICA[Strain=="49134",]
One just has to be careful to recognize that it is being handled as a
character variable and so one has to use the level label.
On 09 Sep 2006 19:08:39 +0200, Peter Dalgaard <[EM
Farrel Buchinsky wrote:
> It is easy to index on numeric variables.
> How does one index on a variable that is a factor?
>
Same as for numeric objects. Example:
R> x <- factor(c("A", "B"))
R> x
[1] A B
Levels: A B
R> x[1]
[1] A
Levels: A B
__
R-he
"Farrel Buchinsky" <[EMAIL PROTECTED]> writes:
> It is easy to index on numeric variables.
> How does one index on a variable that is a factor?
Er, same way. Unless you attach some novel meaning to "index on".
Example?
--
O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
c
It is easy to index on numeric variables.
How does one index on a variable that is a factor?
--
Farrel Buchinsky, MD
Pediatric Otolaryngologist
Allegheny General Hospital
Pittsburgh, PA
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mail