similar to: agrep pmatch recursive???

Displaying 20 results from an estimated 3000 matches similar to: "agrep pmatch recursive???"

2010 Nov 17
2
Bug in agrep computing edit distance?
I posted this yesterday to r-help and Ben Bolker suggested reposting it here... Dickison, Daniel <ddickison <at> carnegielearning.com> writes: > > The documentation for agrep says it uses the Levenshtein edit distance, > but it seems to get this wrong in certain cases when there is a > combination of deletions and substitutions. For example: > > >
2010 Nov 16
1
Bug in agrep computing edit distance?
The documentation for agrep says it uses the Levenshtein edit distance, but it seems to get this wrong in certain cases when there is a combination of deletions and substitutions. For example: > agrep("abcd", "abcxyz", max.distance=1) [1] 1 That should've been a no-match. The edit distance between those strings is 3 (1 substitution, 2 deletions), but agrep matches
2012 Jan 19
1
bug en funcion 'agrep'
Estimados R-users: Estoy intentando usar la función 'agrep' para hacer búsquedas en cadenas de texto. El parámetro max.distance permite controlar la medida de aproximación de búsqueda de la función de Levenshtein. No obstante, cuando hago búsquedas específicas no obtengo siempre el resultado deseado y no se si es un bug o que no entiendo bien el algoritmo de búsqueda. Por
2006 Jan 05
1
Pb with agrep()
Happy new year everybody, I'm getting the following while trying to use the agrep() function: > pattern <- "XXX" > subject <- c("oooooo", "oooXooo", "oooXXooo", "oooXXXooo") > max <- list(ins=0, del=0, sub=0) # I want exact matches only > agrep(pattern, subject, max=max) [1] 4 OK > max$sub <- 1 # One allowed
2012 Dec 11
1
How do you use agrep inside a loop
Hi all. This is my first message at R-help...so I'm hoping I have some beginner's luck and get some good help for my problem! FYI I have just started using R recently so my knowledge of R is pretty preliminary. Okay here is what I need help with - I need to know how to use agrep in a for loop. I need to compare elements of a vector of names with other elements of the same vector.
2004 Feb 11
6
AGREP
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? 2 - The AGREP function doesn't give me the Levenshtein distance (edit distance). Is there a function in R that does
2006 Sep 06
1
How to get multiple partial matches?
Hi, I'm very new to R, and am not at all a software programmer of any sort. I appreciate any help you may have. I have figured out how to get my data into a dataframe and order it alphabetically according to a particular column. Now, I would like to seperate out certain rows based on partial character matches. Here is an (extremely) abreviated example of my data set Probe Ch1
2009 Jun 30
1
possible agrep bug; R 2.9.1, Mac OS X 10.5 (PR#13789)
Same behavior was noted on R 2.9.0 OS X and WIndows. > t(sapply(seq(0.01, .99, length=20), function(x) c(x, length(agrep("Staatssekretar im Bundeskanzleramt","Bundeskanzler",max.distance=x))))) [1,] 0.01000000 0 [2,] 0.06157895 0 [3,] 0.11315789 0 [4,] 0.16473684 0 [5,] 0.21631579 0 [6,] 0.26789474 0 [7,] 0.31947368 0 [8,] 0.37105263 0 [9,]
2013 Jul 15
1
pmatch inconsistency
The pmatch help (see also section 4.3.2 in the R Language Definition) claims that pmatch with duplicates.ok=FALSE provides the same functionality as R's argument matching algorithm, modulo how empty strings are matched. Here's an undocumented inconsistency between pmatch and R's argument matching algorithm: > sessionInfo() R version 3.0.1 (2013-05-16) Platform:
2011 May 19
2
recursive function
Hi, I created a function for obtaining the normal cumulative distribution (I know all this already exists in R, I just wanted to verify my understanding of it). below is the code I came up with. cdf<-function(x) { erf<-function(x) { # approximation to the error function (erf) of the # normal cumulative distribution function # from Winitzki
1999 May 25
1
Muliple partial matches with pmatch
I am using R0.64.1 under Windows 95. The help for `pmatch' states that: If `duplicates.ok' is false multiple matches will result in the value of `nomatch' being returned, and if it is true, the index of the first matching value will be returned. The help for pmatch gives the following examples: pmatch("m", c("mean",
2000 Oct 23
1
Regular Expression and Pmatch
Hi, I wonder if there's a good intro to the pattern matching using R? I'm a perl programer and find it too confusing and complex to use regular expressions under R. For instance, why does pmatch("d","ad") returns NULL? How would I call the functions in order to match any portion of the string? Under what circumstances shall backslush be used? I try to extract all
2008 May 29
1
help (using ?) does not handle trailing whitespace (PR#11537)
> ?agrep > Results in: No documentation for 'agrep ' in specified packages and libraries: you could try 'help.search("agrep ")' There is white space after agrep, that ? doesn't ignore. --please do not edit the information below-- Version: platform = i486-pc-linux-gnu arch = i486 os = linux-gnu system = i486, linux-gnu status = major = 2 minor =
2009 Oct 30
1
bug in `pmatch' (error with too long 'choices')?
I observed the following: match.arg("white", colors()) yields 'white', but match.arg("whit", colors()) yields: `Error in match.arg("whit", colors()) : 'arg' should be one of "white", "aliceblue", '... this message actually comes from `pmatch'. using a suitable subset of `colors()' works OK. the precise length
2004 Feb 13
1
RES: AGREP
"Marcos Sanches" <marcos.sanches at ipsos-opinion.com.br> wrote: Ls1<-length(s1) Ls2<-length(s2) for ( p in 1:ls1){ for (q in 1:ls2){ t1<-levenshteinFast(s1[p],s2[q]) ... Ls1=42000 Ls2=70000 I think I will wait for months untill this program ends. Do you have any sugestion to increase the speed? The first suggestion has to be "search HARD in the
2004 Nov 02
1
install.packages, bundles, pmatch, and Rprofile...
Hi, Somebody asked me to make sure that all the machines running the in our lab (XP and Linux, both running 2.0) have R installed and that A) All the packages are installed and B) kept up-to-date. Obediently, I began to modify a shared Rprofile so that once a week it checks for new packages and updates to the current version of the installed packages on CRAN. Sounds simple enough. Plus some
2007 Jul 10
3
ECDF, distribution of Pareto, distribution of Normal
Hello all, I would like to plot the emperical CDF, normal CDF and pareto CDF in the same graph and I amusing the following codes. "z" is a vector and I just need the part when z between 1.6 and 3. plot(ecdf(z), do.points=FALSE, verticals=TRUE, xlim=c(1.6,3),ylim=c(1-sum(z>1.6)/length(z), 1)) x <- seq(1.6, 3, 0.1) lines(x,pgpd(x, 1.544,0.4373,-0.2398), col="red") y
2010 Feb 09
1
how to adjust the output
Hi R-users,   I have this code below and I understand the error message but do not know how to correct it.  My question is how do I get rid of “with absolute error < 7.5e-06” attach to value of cdf so that I can carry out the calculation.   integrand <- function(z) { alp  <- 2.0165   rho  <- 0.868   # simplified expressions   a      <- alp-0.5   c1     <-
2007 Sep 12
1
Integrate() error message, I am at a loss
Hello! I have a problem with integrate() in my function nctspa(). Integrate produces an error message "evaluation of function gave a result of wrong length". I don't know what that means. Could anyone suggest me what is wrong with my function? These are the examples of function calls that work OK: nctspa(a=1:10,n=5) nctspa(a=1:10, n=5, mu=2, theta=3, renorm=0) This does not work:
2008 Jun 27
1
Similarity matching with probabilities
Hello, It's just a strange coincidence that someone posted just very recently a question about matching. I know there are several match function in the base package (such as match, pmatch, charmatch, and the gsub etc) but I can't seem to use them wisely to be able to get what I need. suppose I have the following strings: "tets" "estt" "rtes7"