From jorismeys at gmail.com  Thu Nov 18 10:56:56 2010
From: jorismeys at gmail.com (Joris Meys)
Date: Thu, 18 Nov 2010 10:56:56 +0100
Subject: [Rd] Bug in agrep computing edit distance?
In-Reply-To: <C909CBCE.2B6D%ddickison@carnegielearning.com>
References: <AANLkTimcYnOfRGAFbkrP3uEHKaQ8Q0iPcQRch69iHJa=@mail.gmail.com>
	<C909CBCE.2B6D%ddickison@carnegielearning.com>
Message-ID: <AANLkTik4cB7pxug6Mz75Ok0646ajVDgBY59NVcOA-kfr@mail.gmail.com>

On Thu, Nov 18, 2010 at 12:23 AM, Dickison, Daniel
<ddickison at carnegielearning.com> wrote:
> On 11/17/10 6:06 PM, "Joris Meys" <jorismeys at gmail.com> 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.



[Rd] Bug in agrep computing edit distance?
Joris Meys