[R] Retrieve regular expression groups
OKB (not okblacke)
brenbarn at brenbarn.net
Thu May 6 05:03:30 CEST 2010
Gabor Grothendieck wrote:
> Note that X and FUN are also arguments to sapply
>
>> args(sapply)
> function (X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE)
> NULL
>
> so the sapply construct in your post has the effect of applying c
> to tmp, pats and strapply so the output you observe is correct.
> The sapply command never even calls strapply.
Ah, I see. I take it this means it is not possible to use sapply
with strapply directly. (I'd have to write a function that wraps
strapply with different argument names, and then sapply that.) Anyway,
I managed to do what I wanted by collapsing my multiple regexes into
one, so it's good for now. Thanks for the help.
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
More information about the R-help
mailing list