m***y 发帖数: 79 | 1 就是测试是否一系列数是否random
given a pattern a, find the number of times this pattern occurs in sequence
x
先谢 | t******g 发帖数: 372 | 2 > x<-'AAACCCGGGTTTCCC'
> reg<-gregexpr('CCC', x)
> reg
[[1]]
[1] 4 13
attr(,"match.length")
[1] 3 3
attr(,"useBytes")
[1] TRUE
> reg<-gregexpr('CCC', x)
> length(reg[[1]])
[1] 2
HTH
sequence
【在 m***y 的大作中提到】 : 就是测试是否一系列数是否random : given a pattern a, find the number of times this pattern occurs in sequence : x : 先谢
| m***y 发帖数: 79 | |
|