Skip to content
Prev 163830 / 398506 Next

Strplit code

John Fox wrote:
right.  the speedup is not due to any substantial algorithmic
difference, but rather in that your code is r code, while mine uses
gregexpr, which is i assume is precompiled from c code or the like.

about 'wrong' and 'flawed', again:  what i meant is that as a suggestion
for how strsplit, in general, could be written, it doesn't meet the
challenge, and should at least issue a warning if the split pattern
specifies non-1-length splits.  otherwise, it could be perfectly fit for
a student's exercise.
possibly, and then it's my code that is wrong and flawed ;)
i haven't used s-plus for ages, jumping to the global frame instead of
lexical scoping scared me away.

vQ