[R] Split a vector(list) into 3 list

Patrick Wang pwang at berkeley.edu
Fri May 18 02:14:36 CEST 2007


Hi,

I have a vector contains values 1,2,3.

Can I call a function split to split it into 3 vectors with 1 corresponds
to value ==1, which contain all the indexes for value==1.

2 corresponds to value ==2 which contain all the indexes for value=2

Thanks
pat



More information about the R-help mailing list