Re: [Rd] Bug in agrep computing edit distance?

From: Joris Meys <>
Date: Thu, 18 Nov 2010 10:56:56 +0100

On Thu, Nov 18, 2010 at 12:23 AM, Dickison, Daniel <> wrote:
> On 11/17/10 6:06 PM, "Joris Meys" <> wrote:
> It looks like R's agrep defaults max.distance$all to 0.1 if unspecified by
> the argument, so that explains these examples (the first and last one have
> a net distance of 2, which is > ceiling(0.1 * nchar(pattern))).

Stupid I missed that. Adding all=3 solves the problem indeed. Funny that all is not set to a more sensible value when one is set. mailing list Received on Thu 18 Nov 2010 - 09:59:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 18 Nov 2010 - 10:50:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive