Re: [R] Transform a list of multiple to a data.frame which I want

2015-02-02 Thread William Dunlap
Does the following work for you. The only trick is working around the fact that matrix subscripting does not allow out-of-bounds subscripts but vector subscripting does. We do the subscripting in two steps, relying on the drop=TRUE default in the matrix subscripting operator that converts the

Re: [R] Transform a list of multiple to a data.frame which I want

2015-02-02 Thread Jim Lemon
Hi Yao, Messy, but this is the closest I can get: yhlist-list(K=matrix(0,ncol=2,nrow=0), GSEGTCSCSSK=matrix(c(6,8),nrow=2,ncol=2), GFSTTCPAHVDDLTPEQVLDGDVNELMDVVLHHVPEAK=matrix(6,ncol=2,nrow=1), LVECIGQELIFLLPNK=matrix(6,ncol=2,nrow=1), NFK=matrix(0,ncol=2,nrow=0),

[R] Transform a list of multiple to a data.frame which I want

2015-02-01 Thread Yao He
Dear all: I have a list like that,which is a standard str_locate_all() function (stringr package) output: $K start end $GSEGTCSCSSK start end [1,] 6 6 [2,] 8 8 $GFSTTCPAHVDDLTPEQVLDGDVNELMDVVLHHVPEAK start end [1,] 6 6 $LVECIGQELIFLLPNK start end [1,] 4