On Wed, 11 Feb 2004 14:53:33 -0300, you wrote:

>
>       Hi all, I have two questions
>
>1 - I have the version 1.4.1 of R, and it doesn't have the 'agrep'
>function in the base library. Is there a way to make this funcion
>avaliable in R 1.4.1? I mean, how to 'copy' it from R 1.8.1 and 'paste'
>it in R 1.4.1?

The easiest way is to install 1.8.1.  There have been a *lot* of
improvements in R since 1.4.1

>2 - The AGREP function doesn't give me the Levenshtein distance (edit
>distance). Is there a function in R that does it? Is there a way to use
>AGREP to acomplish this task? I've written such a function, but it is so
>slow (has so many loops) that it is beeing useless. 

I don't think there's a function, but I imagine this should be
possible.  You'd need to look at src/main/apse.c to find which
function returns this information, and then write code something like
do_agrep (in character.c) to call that function instead of calling
apse_match.

Duncan Murdoch

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to