similar to: One-to-one matching?

Displaying 20 results from an estimated 2000 matches similar to: "One-to-one matching?"

2008 Aug 06
1
Matching a period in grep...
Hi folks, Can anyone enlighten me as to why I get the following when I search for ".csv" at the end of a string? > grep("\.csv$","Blah.csv",value=TRUE) [1] "Blah.csv" Warning messages: 1: '\.' is an unrecognized escape in a character string 2: unrecognized escape removed from "[\.]csv$" R reference for regular expressions says
2013 Jun 05
1
[LLVMdev] TableGen lookup table recipe?
Is it possible to define lookup tables as a list in tablegen, to map one value to another? Here's the template I was working on: ========================================= class LookupTable { list<int> mapping = [0, 8, 16, 24, 32]; } def LUT : LookupTable; class MyRegister<name, index> : Register<name> { let HWEncoding = LUT.mapping[index]; int otherVal = index;
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:
2023 Dec 16
2
Partial matching performance in data frame rownames using [
On Wed, 13 Dec 2023 09:04:18 +0100 Hilmar Berger via R-devel <r-devel at r-project.org> wrote: > Still, I feel that default partial matching cripples the functionality > of data.frame for larger tables. Changing the default now would require a long deprecation cycle to give everyone who uses `[.data.frame` and relies on partial matching (whether they know it or not) enough time to
2023 Dec 19
1
Partial matching performance in data frame rownames using [
Hi Hilmar and Ivan, I have used your code examples to write a blog post about this topic, which has figures that show the asymptotic time complexity of the various approaches, https://tdhock.github.io/blog/2023/df-partial-match/ The asymptotic complexity of partial matching appears to be quadratic O(N^2) whereas the other approaches are asymptotically faster: linear O(N) or log-linear O(N log N).
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",
2009 Aug 30
0
[LLVMdev] Regular Expression lib support
On Aug 28, 2009, at 1:53 AM, Daniel Dunbar wrote: > Nice! > > This looks good to me but probably Chris or someone else should sign > off on it. This seems ok to me, please commit. One minor comment: +++ b/lib/Support/Regex.cpp + // Allocate pmatch with at least one element. + pmatch = new llvm_regmatch_t[nmatch > 0 ? nmatch : 1]; + pmatch[0].rm_so = 0; + pmatch[0].rm_eo =
2009 Dec 19
3
integer(0) and NA do not equal FALSE
Hi, A noobie question: I'm simply trying to run a conditional statement that evaluates if a substring is found within a larger string. I find that if it IS found, my function returns TRUE (great!), but if not, the condition does not evaluate to FALSE. ex): if( grep("hi", "hop", fixed = TRUE) ) print('yes, your substring is in your string') else
2007 Oct 25
2
Novice programing question
Hi all, I apologize for the ignorance implicit in this question, but I'm having a hard time figuring out how R functions work. For example, if I wanted to write a function to compute a variance, I would do something like >my.var <- function(x) (sum(((x-mean(x)))^2))/(length(((x-mean(x))) ^2)-1) And this seems to work, e.g., > my.var(V1) [1] 116.1 > var(V1) [1] 116.1
2010 May 19
3
Strange case of partial matching in .[ - possible bug / wrong documentation?
Hi all, This occurred in R-2.11.0 (WinXP). The R-help page of .[ says that: "Character indices can in some circumstances be partially matched (see pmatch) to the names or dimnames of the object being subsetted (but never for subassignment). Unlike S (Becker et al p. 358)), R has never used partial matching when extracting by [, and as from R 2.7.0 partial matching is not by default used by
2005 Jan 19
1
* creating vignettes ... ERROR
Hi, I have the following error when building a package * creating vignettes ... ERROR Error: chunk 3 Error in pmatch(x, table, duplicates.ok) : argument is not of mode character Error in buildVignettes(dir = ".") : Error: chunk 3 Error in pmatch(x, table, duplicates.ok) : argument is not of mode character Execution halted I use R-2.0.1 under debian linux 2.6.9
2010 Nov 09
1
agrep pmatch recursive???
Hello R Helpers, Business - 64 bit windows 7, R 2.11.1 I am trying to match the character contents of one list, called 'exclude', to those of a second list, called 'dataset' dataset is a list of file names with folder locations, and looks like this when called: > dataset [1] "A/10-10-29a-13.cdf" "A/10-10-29a-14.cdf" "A/10-10-29a-15.cdf"
2007 Sep 02
1
buglet in dist() ?
the first line of dist() says if (!is.na(pmatch(method, "euclidian"))) shouldn't that be "euclidean" ? --------------------- R version 2.5.1 (2007-06-27) i486-pc-linux-gnu locale:
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
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
2003 Aug 26
3
matching-case sensitivity
Hi All, I am trying to match two character arrays (email lists) using either pmatch(), match() or charmatch() functions. However the function is "missing" some matches due to differences in the cases of some letters between the two arrays. Is there any way to disable case sensitivity or is there an entirely better way to match two character arrays that have identical entries but written
2010 Aug 09
1
Smart Indexing
Hi all, Suppose that I've two data frames, a and b say, both containing a column 'id'. While data frame 'a' contains multiple rows sharing the same id, data frame 'b' contains just one entry per id (i.e. a 1 to n relationship). For the ease of modeling I now want to generate a new data frame c, which is basically a copy of data frame 'a' augmented by the values
2006 Mar 07
3
Expanding partial names
I'm writing wrappers for some functions that change some of the default arguments. I'd rather not list all of the arguments for the low level functions because there are about a dozen wrapper functions, and about 20 arguments to lowlevel. Instead I'm trying something like this: lowlevel <- function(longname = 1) { cat("longname = ", longname, "\n") }
2009 Aug 28
3
[LLVMdev] Regular Expression lib support
Nice! This looks good to me but probably Chris or someone else should sign off on it. There were two minor warnings on Darwin: -- In file included from /Volumes/Data/Users/ddunbar/llvm/lib/Support/regexec.c:81: /Volumes/Data/Users/ddunbar/llvm/lib/Support/regengine.inc: In function 'sbackref': /Volumes/Data/Users/ddunbar/llvm/lib/Support/regengine.inc:665: warning: control reaches end of
2011 Oct 18
1
Function to "lump" factors together?
Sorry about the odd terminology, but I suspect that my intent might be completely missed had I used "aggregate" or "classify" (each of which appears to have some rather special meanings in statistical analysis and modeling). I have some data about software builds; one of the characteristics of each is the name of the branch. A colleague has generated some fairly interesting