Skip to content
Prev 314636 / 398502 Next

non-consing count

My 2 cents:

AFAIK both which and length are from C compiled code:

http://cran.r-project.org/doc/manuals/r-release/R-ints.html#g_t_002eInternal-vs-_002ePrimitive

so they must be quite efficient ie .Primitive and .Internal. Probably
combination
of this with a pattern in C would be more memory efficient to count
patterns, but
would that make sense? Because in general if you look for a pattern in
a vector, you
need to know where it is, hence which operation, at least for debugging/testing
purposes...
On 4 January 2013 16:30, Sam Steingold <sds at gnu.org> wrote: