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.

______________________________________________
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.

Reply via email to