similar to: matching character substrings

Displaying 20 results from an estimated 4000 matches similar to: "matching character substrings"

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 Nov 09
1
invert argument in grep
Hello, What about an `invert` argument in grep, to return elements that are *not* matching a regular expression : R> grep("pink", colors(), invert = TRUE, value = TRUE) would essentially return the same as : R> colors() [ - grep("pink", colors()) ] I'm attaching the files that I modified (against today's tarball) for that purpose. Cheers, Romain --
2003 Feb 08
3
Find strings in a array
I need to know which strings of an array that are in another array. What a best solution? Tks, Francisco. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Francisco JĂșnior, Computer Science - UFPE-Brazil "One life has more value that the world whole" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2007 Apr 27
2
proportional sampling
Dear All, I wonder if you could help me. I have a table with a series of sites that I would like to sample from. The table has 5 columns: ID X Coordinate Y Coordinate Value Factor The conditions are that each site can be selected more than once and the probability of it being selected (or sampled) is proportional to a factor located in column 'Factor' I am novice in terms of R, and
2008 Jun 23
3
One-to-one matching?
Hi folks, Can anyone suggest an efficient way to do "matching without replacement", or "one-to-one matching"? pmatch() doesn't quite provide what I need... For example, lookupTable <- c("a","b","c","d","e","f") matchSample <- c("a","a","b","d") ##Normal match()
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 13
1
Partial matching performance in data frame rownames using [
Dear Ivan, thanks a lot, that is helpful. Still, I feel that default partial matching cripples the functionality of data.frame for larger tables. Thanks again and best regards Hilmar On 12.12.23 13:55, Ivan Krylov wrote: > ? Mon, 11 Dec 2023 21:11:48 +0100 > Hilmar Berger via R-devel <r-devel at r-project.org> ?????: > >> What was unexpected is that in this case was that
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).
2011 Nov 08
2
match first consecutive list of capitalized words in string
Dear R-Helpers, this is my first post ever to a mailing list, so please feel free to point out any missunderstandings on my side regarding the conventions of this mailing list. My problem: Assuming the following character vector is given: names <- c("filia Maria", "vidua Joh Dirck Kleve (oo 02.02.1732)", "Bernardus Engelb Franciscus Linde j.u.Doktor referendarius
2009 Jun 20
1
error ellipse
Dear All, I have a data set with the following structure: [A], [a], [B], [b] where [A] and [B] are measurements and [a] and [b] are the associated uncertainties. I produce [B]/[A] vs. [A] plots in R and would like to show uncertainties as error ellipses (rather than error bars). Would this be relatively easy to do in R? I would appreciate any help on this Thanks a lot Tibi
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
2013 Jan 07
3
pattern matching
Hi, I have a simple question. Suppose I have a string "x$Expensive". I want to find the position of the $ in this string; i.e., I want a function that returns 2. I tried grep, regexpr, etc with no luck, unless I'm just using them incorrectly. Any suggestions? Thanks, Walt ________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro,
2007 Jan 20
4
simple q: returning a logical vector of substring matches
I'm a relative R novice, and sometimes the simple things trip me up. Suppose I have a <- c("apple", "pear") and I want a logical vector of whether each of these strings contains "ear" (in this case, F T). What is the idiom? Quizzically, Mark Lindeman
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
2004 Mar 24
1
string problems ( grep and regepxr)
Recently working with strings and data I have found a small problem. Windows XP R 1.8.1 Reading data from a "txt file" with readLine. finding a specific line with "grep" command, all OK. but here comes the problem... After finding the correct line(s) i need to find a substring inside each string. In this case "tabs" I think it represented by "\t" in the
2008 Jun 19
4
Any simple way to subset a vector of strings that do contain a particular substring ?
For example, strings <- c("aaaa", "bbbb","ccba"). How to get "aaaa", "bbbb" that do not contain "ba" ? _________________________________________________________________ [[alternative HTML version deleted]]
2008 May 29
2
how to use substring match as condition?
Hi, How can I use a substring match as a condition in a subset command? Sth like this: subset(input, field1=="blah1" & field2=="blah2") # but now with substring match in field2 subset(input, field1=="blah1" & field3 *substringmatch* "blah3") I've tried with gsub, but it won't work: subset(input, field1=="blah1" &
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:
2010 Aug 03
1
Bug#591537: xen: FTBFS on sparc: Scilab cannot open JVM library.
Source: xen Version: 4.0.1~rc5-1 Severity: serious Justification: FTBFS User: debian-sparc at lists.debian.org Usertags: sparc Hi, your package no longer builds on sparc: | make[1]: Leaving directory `/build/buildd-sivp_0.5.2-2-sparc-3aHxSt/sivp-0.5.2' | SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 DOCBOOK_ROOT=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh \ | /usr/bin/scilab -nw -f
2004 Feb 27
2
Is there a way to deactivate partial matching in R?
Dear R-experts, I just tracked down a nasty bug in a dynamically parametrized function to wrong argument matching. As we get more and more complex applications build on top of R (like bioconductor) partial matching gets more and more dangerous. I would like to deactivate partial matching in R (partial argument matching as well as partial matching of list elements), e.g. using an environment