agrep{base} is very useful, but it would be very useful to also have the
offset of the first match returned, e.g.
agrepx("foo","sdxforzoo",max.distance=1) => 4 (there is room for quibbling
over the definition of first match...). As far as I can tell, the only way
to do that now is to do multiple agreps, something like
min(agrep("foo",substr(rep("foobar",...))). Is there a version of R agrep
that instead just returns the position of first match?
The TRE package (http://www.laurikari.net/tre/) implements a much more
general version of agrep (including such functionality) -- has anyone
integrated it into R?
Thanks,
-s
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.