Displaying 1 result from an estimated 1 matches for "aaacdf".
Did you mean:
aaaaf
2003 Mar 28
1
overlapping pattern match (errata 2.0)
well! excuse me again but...
your.string <- "aaacdf"
nc1 <- nchar(your.string)-1
x <- unlist(strsplit(your.string, NULL)) ######## CORRECT
x2 <- c()
for (i in 1:nc1)
x2 <- c(x2, paste(x[i], x[i+1], sep="")) ######## ERRATA 2
cat("ocurrences of <aa> in <your.string>: ", length(grep("aa", x2))...