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
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),
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
3 matches
Mail list logo