[R] array slice notation?
Steve Jaffe
sjaffe at riskspan.com
Wed Aug 5 04:45:55 CEST 2009
Very nice. Two questions:
1> Do you have any idea of the timing difference, if any, between this and
the vector-subscripting method?
2> How do you generalize this to select multiple rows eg with indexes given
by a vector 'v'?
Søren Højsgaard wrote:
>
> You can do
>> A <- HairEyeColor
>> do.call("[", c(list(A),list(1,T,T)))
> Sex
> Eye Male Female
> Brown 32 36
> Blue 11 9
> Hazel 10 5
> Green 3 2
>
> Regards
> Søren
>
--
View this message in context: http://www.nabble.com/array-slice-notation--tp24814643p24819883.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list