[R] index question

From: Afshartous, David <afshart_at_exchange.sba.miami.edu>
Date: Sat 08 Oct 2005 - 01:46:31 EST

All,
I'm having a problem selecting directly from a vector. I've written ways to do this indirectly, but I'd rather do it directly and didn't see this in the manual.

Essentially, I have:

> group.label.new

 [1] 7 9 6 1 10 4 8 3 2 5
> junk

[1] 1 2
> group.label.new[junk && 8:10]

 [1] 7 9 6 1 10 4 8 3 2 5

I'd like to select the elements indexed by "junk" and also the 8th through 10th elements, which clearly isn't the result I'm getting. Any help appreciated, and please reply directly to afshar@miami.edu

cheers,
dave

        [[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 Received on Sat Oct 08 01:47:59 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:38 EST