similar to: gsub issue with consecutive pattern finds

Displaying 20 results from an estimated 1000 matches similar to: "gsub issue with consecutive pattern finds"

2024 Mar 01
1
gsub issue with consecutive pattern finds
Here's another *incorrect* way to do it -- incorrect because it will not always work, unlike Iris's correct solution. But it does not require PERL type matching. The idea: separate the two vowels in the regex by a character that you know cannot appear (if there is such) and match it optionally, e.g. with '*" repetition specifier. I used "?" for the optional character
2024 Mar 01
1
gsub issue with consecutive pattern finds
Hi Iris, Thank you. Further, very nice solution. Best, Iago On 01/03/2024 12:49, Iris Simmons wrote: > Hi Iago, > > > This is not a bug. It is expected. Patterns may not overlap. However, there > is a way to get the result you want using perl: > > ```R > gsub("([aeiouAEIOU])(?=[aeiouAEIOU])", "\\1_", "aerioue", perl = TRUE) > ``` >
2024 Mar 01
1
gsub issue with consecutive pattern finds
Hi Iago, This is not a bug. It is expected. Patterns may not overlap. However, there is a way to get the result you want using perl: ```R gsub("([aeiouAEIOU])(?=[aeiouAEIOU])", "\\1_", "aerioue", perl = TRUE) ``` The specific change I made is called a positive lookahead, you can read more about it here: https://www.regular-expressions.info/lookaround.html
2008 Feb 03
4
Extract vowels and consonants using Ruby Regex
Hello, I am trying to build a regex to extract vowels and consonants from a string. So far, I am able to extract the basic a-e-i-o-u sequence using the following extension to the String class: class String def vowels scan(/[aeiou]/i) end def consonants scan(/[^aeiou]/i) end end examples: >> "Mary had a little lamb".vowels => aaaiea >> "Mary had a
2010 Nov 30
1
Compiling ocfs2-tools-1.6.3 on slackware64-13.1
Hello all, I'm having trouble compiling ocfs2-tools-1.6.3 on slackware64-13.1 These are my configure flags (the last 2 I added after googling this problem, but didn't help): ./configure \ --sbindir=/sbin \ --bin=/bin \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --datadir=/etc/ocfs2 \ --sharedstatedir=/var/ocfs2 \ --libexecdir=/usr/libexec \
2009 Jan 22
4
text vector clustering
Hi, I am a new user of R using R 2.8.1 in windows 2003. I have a csv file with single column which contain the 30,000 students names. There were typo errors while entering this student names. The actual list of names is < 1000. However we dont have that list for keyword search. I am interested in grouping/cluster these names as those which are similar letter to letter. Are there any
2023 Nov 09
1
Why Rprofile.site is not built with manual installation of R devel in linux?
Hi all, I downloaded R-devel as explicited in https://developer.r-project.org/SVNtips.html Then, I tried to install it through instructions in https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#Installation (taking into account also https://stat.ethz.ch/pipermail/r-devel/2016-May/072777.html) So: export REPOS=https://svn.r-project.org/R export RTOP=~ #adjust as necessary cd $RTOP svn co
2005 Jun 14
1
operators as S4 methods
Dear all, I need to re-define some mathematical operators (+, *, /, etc) for an S4 class based on array. All references I have found (S Programming, Green Book) show how to define S3 methods for this (like in page 89 of S Programming for "-.polynomial"). What is the preferred S4 way for doing this? I hope I haven't missed some obvious piece of documentation. Many thanks, Iago
2004 Nov 29
1
\link{} to help pages in Debian
Hello, In my Debian 3.0 systems, packages are installed in two different places, namely /usr/lib/R/library and /usr/local/lib/R/site-library, depending on whether they come from debian packages or CRAN ones. Help pages for my own packages, installed in the second location, cannot find help pages from, for example, the base package via \link{}. I also tried specifying the package with
2023 Nov 09
1
[R] Why Rprofile.site is not built with manual installation of R devel in linux?
No clue. Tip: R-devel is the mailing list for anything related to development versions of R. Off-topic here. On November 9, 2023 2:59:44 AM PST, "Iago Gin? V?zquez" <iago.gine at sjd.es> wrote: >Hi all, > >I downloaded R-devel as explicited in https://developer.r-project.org/SVNtips.html >Then, I tried to install it through instructions in
2023 Nov 09
1
[R] Why Rprofile.site is not built with manual installation of R devel in linux?
No clue. Tip: R-devel is the mailing list for anything related to development versions of R. Off-topic here. On November 9, 2023 2:59:44 AM PST, "Iago Gin? V?zquez" <iago.gine at sjd.es> wrote: >Hi all, > >I downloaded R-devel as explicited in https://developer.r-project.org/SVNtips.html >Then, I tried to install it through instructions in
2024 Feb 12
1
Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line
On 2/9/24 21:39, Iago Gin? V?zquez wrote: > Duncan, do you think it's worth to comment this in R-devel list? Duncan filed a bug report via R bugzilla (thanks). There is no way to disable this functionality and it has existed for very long time, I tested that at least in R 3.0. Optionally ending the session was I believe intentional with Ctrl+D, when the input is empty, and it is also
2024 Feb 09
1
Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line
Duncan, do you think it's worth to comment this in R-devel list? Iago ________________________________ De: CALUM POLWART <polc1410 at gmail.com> Enviat el: divendres, 9 de febrer de 2024 18:28 Per a: Duncan Murdoch <murdoch.duncan at gmail.com> A/c: Iago Gin? V?zquez <iago.gine at sjd.es>; r-help at r-project.org <r-help at r-project.org> Tema: Re: [R] Avoiding Delete
2024 Feb 09
1
Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line
I don't use term, but I've just tested it and this is reproducable. Is it a bug? Not sure. If you hit c after getting the message it will cancel the q() request. On Fri, 9 Feb 2024, 17:21 Duncan Murdoch, <murdoch.duncan at gmail.com> wrote: > That looks to me like a bug, but I don't use Windows any more, so I > won't offer to try to fix it for you. In fact I
2019 Sep 13
2
Printing chinese characters (UTF-8) on R 3.5.2 -windows 10
But if I type > "?" the output is [1] "?" so seemingly it can be represented. Or, am I wrong? Best Iago ________________________________ De: Tomas Kalibera <tomas.kalibera at gmail.com> Enviat el: divendres, 13 de setembre de 2019 11:24 Per a: IAGO GIN? V?ZQUEZ <i.gine at pssjd.org>; r-devel at r-project.org <r-devel at r-project.org> Tema: Re: [Rd]
2007 Apr 19
2
setClass inside a function
Hello, I would like to create a function that gets passed a class name and then calls setClass, and a few other functions, inside. I have done this in the past with setmethod, creating accessors for all slots in a set of S4 classes. But setClass is choking when my function is called isnide a package, telling about an error in exists(cname, where). I assume this to be a problem with the
2024 Feb 09
1
Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line
Yes, indeed, I am talking about Rterm in Windows. Iago ________________________________ De: Duncan Murdoch <murdoch.duncan at gmail.com> Enviat el: divendres, 9 de febrer de 2024 13:50 Per a: Iago Gin? V?zquez <iago.gine at sjd.es> Tema: Re: [R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line On 09/02/2024 6:25 a.m., Iago Gin?
2024 May 15
1
FR: Customize background colour of row and column headers for the View output
About the decisions: Actually, the same way dataedittext modifies the text colour not only of data, but also of row and column names, and dataedituser modifies the colour of all the borders, I think dataeditbg should modify the background of all the window, at least that "inside" those borders. Otherwise, any other option for the background colour on row and column headers would allow
2004 Jun 16
2
Loading 'akward' data file
Generally you'd use file() to open the file, then use readLines(), say inside a while() loop to read one `chunk' at a time. However, your example looks a bit strange. The possibility of empty line makes it a bit more complicated, by that last couple of lines seems to suggest that you could have a line of data follow by another line of data without variable label. If that's true, I
2019 Sep 13
2
Printing chinese characters (UTF-8) on R 3.5.2 -windows 10
I have a chinese character on a data frame, but the output of printing it is its UTF-8 code. Concretely, the character is ? and the code is U+6703. Following the code I arrive to the instruction > base::format.default("?") which prints [1] "<U+6703>" I do not know which is the extent of this behaviour either if it follows on most recent versions of R. Is it