Re: [R] Indexing on a variable that is a factor

From: Farrel Buchinsky <fjbuch_at_gmail.com>
Date: Sat 09 Sep 2006 - 17:12:18 GMT

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 <p.dalgaard@biostat.ku.dk> wrote:
>
> "Farrel Buchinsky" <fjbuch@gmail.com> 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/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen Denmark Ph: (+45)
> 35327918
> ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45)
> 35327907
>

-- 
Farrel Buchinsky
Mobile: (412) 779-1073

	[[alternative HTML version deleted]]


______________________________________________ R-help@stat.math.ethz.ch 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.

Received on Sun Sep 10 03:19:01 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 09 Sep 2006 - 17:30:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.