search for: dbabddadd

Displaying 1 result from an estimated 1 matches for "dbabddadd".

2008 Aug 10
2
Basic data structures
...und the correct documentation. Here's a simple example which illustrates several of my problems. Suppose I want to have a regexp match against a string, and return all the matching substrings in a vector of strings. regexp <- "[ab]+" strlist <- c( "abc", "dbabddadd", "aaa" ) matches <- gregexpr(regexp,strlist) With this input, I'd want to return list( list("ab"), list("ab", "a"), list("aaa") ). Now the matches object prints out as [[1]] [1] 1 attr(,"match.length") [1] 2...