similar to: Retrieve regular expression groups

Displaying 20 results from an estimated 2000 matches similar to: "Retrieve regular expression groups"

2009 Sep 16
2
Generalized cumsum?
Is there anything like cumsum and cumprod but which allows you to apply an arbitrary function instead of sum and product? In other words, I want a function cumfunc(x, f) that returns a vector, so that for all n up to the length of x cumapply(x,f)[n] = f(x[1:n]) This would give cumsum and cumprod as special cases when f=sum or f=prod. I could write such a function, but I can't see
2009 Sep 16
1
Windows RGui line editing
I've been using Tinn-R with RGui on Windows for quite some time now, but it's very irritating how the Windows RGui allows only very rudimentary line-editing. I can't even use shift-arrow key to select text! I searched through the archives and found what seemed to be a few people asking about this, but I couldn't find a clear answer. I saw some references in the docs to
2009 Apr 15
0
ave returns wrong type
I've been using the ave function to compute some statistics on a data frame. After a while I noticed that, for some reason, it was returning numerical statistics as strings instead of numbers. I delved into the code of the functions and traced the problem to the following fact: ave uses split<- to do its work. Specifically, it does "split(x, g) <- lapply(split(x, g),
2009 Apr 19
1
ave returns wrong data type (PR#13664)
Full_Name: Brendan Barnwell Version: 2.9.0 OS: Windows XP Pro Submission from: (NULL) (71.102.131.29) The ave() function returns an incorrect datatype. Specifically, ave(x, g, f) always returns a vector with the same mode as x, rather than using the mode of the vector returned by f. Observe: > x [1] "A" "B" "C" "A" "B" "C"
2006 Jan 03
1
Problem with date & time on Aastra480isincerelease 1.3
Actually it worked, but only after I defaulted all the settings on the phone and let it pick the config up fresh. Anyone know if there is any headset config options to default to headset/speaker? Thanks Lee -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Lee Archer Sent: 03 January 2006 14:49 To:
2006 Mar 03
9
Preferred editor(s) dialplan coding?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey all, First of all, hello again! Been a while since I've posted to the list, but I've been here lurking and watching ;-) Anyway, I wanted to pose a general question to the list to see if it turns up new suggestions for everyone/me. What is your preferred editor when coding in the dialplan? This is mainly aimed at those of you who write
2009 Jun 08
3
using regular expressions to retrieve a digit-digit-dot structure from a string
Hi, i need to recognize itemization structures in strings which follow the format: "digit-digit-dot" like e.g. 1. 2. 19. 211. Given the string " This happened in the 21. century." (the dot behind 21 is used in German instead of 21st) I want know where the dots are but I do not want the 21.-dot to be returned as well. I am not good at regular expressions. How
2005 Oct 27
0
Re: [Zabbix-users] icmpping not working
hello friends, You are right, changed the user to root, and icmpping and icmppingsec are working now!!! Thank you!!!! On 10/26/05, Fortin, Benoit <benoit.fortin@cgi.com> wrote: > > > Hi, > > The setuid of fping was already set, as you can see : > > zabbix@wirelessKTM:~/fping-2.4b2_to$ ls -l fping > -rwsr-xr-x 1 zabbix zabbix 69258 2005-10-26 17:59 fping >
2006 Jan 27
2
Name/username (sip show peers)
How can I make it more readable? Name/username 601/601 123456789/123456789 voipbuster/abcd 601 = hotline 123456789 = Peter Pan only voipbuster/abcd is easy read/understandable! bye Ronald Wiplinger
2002 Mar 06
0
Easy way of sharing sub-directories?
We are gradually migrating our users away from Sun Solstice NFS client over to using Samba on the Solaris servers. The PCs that the users use run Windows NT. We've hit a snag. Some of the directories that we are sharing out need to have the drive letters mapped to sub-directories of the share. This seems to be possible with Windows 2000 and Windows XP, but NT doesn't seem to be able to do
2012 Feb 03
3
SPATIAL QUESTION: HOW TO MAKE POLYGONS AROUND CLUSTERS OF POINTS AND EXTRACT AREAS AND COORDINATES OF THESE POLYGONS?
Imagine that I have a large number of points (given by coordinates x and y) that vary in density per space. For the purpose of demonstration it could be generated like this: s <- data.frame(x=runif(10000,0,900),y=runif(10000,0,900)); plot(s) I want to create polygons around the points where point density is greater than a selected threshold (for example, by using krieging or equivalent
2010 Mar 26
1
regular expression
Hi, I need to select a substring from the filename of a file in a list. I can find all the filenames in a directory by list.files(fn_dir) Each filename has the format (the following is an example because field lengths are variable) XXX184_YYY_ZZZ.dat XXX: 2 or 3 alphabetic characters 184: 3 numeric characters ... I'd like to select the substring XXX which has variable length (from each
2007 Apr 06
2
regular expression
Dear R-List, I have a great many files in a directory and I would like to replace in every file the character " by the character ' and in the same time, I have to change ' by '' (i.e. the character ' twice and not the unique character ") when the character ' is embodied in "....." So, "....." becomes '.....' and
2010 Oct 13
5
Regular expression to find value between brackets
Hi, this should be an easy one, but I can't figure it out. I have a vector of tests, with their units between brackets (if they have units). eg tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)") Now I would like to hava a function where I use a test as input, and which returns the units like: f <- function (x) sub("\\)",
2008 Nov 02
5
R newbie: how to replace string/regular expression
Hello; I am a R newbie and would like to know correct and efficient method for doing string replacement. I have a large data set, where I want to replace character "M", "b", and "K" (currency in Million, Billion and K) to millions. That is 209.7B with (209.7 * 10e6) and 100.00K with (100.00 *1/100) and etc.. d <- c("120.0M", "11.01m",
2009 Jul 08
5
R regular expression to extract words with the query string.
Hi, Is there a way in R to get the string which matches the expression, where the expression is a substring of the parent string. Lets say, I have $i <- "transcript:ENST0000112334 pid:ENSP000012345" What I need is the string "pid:ENSP000012345" from $i using the query "ENSP". Appreciate your comments. Praveen Surendran School of Medicine and
2010 Feb 08
2
the hat ^ in regular expression
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100208/52a6d080/attachment.pl>
2009 Dec 07
3
Regular expression help
Hi there I have a string like this i want to extract 9831019 from this string i used a regular expresion \d+ by which i can only make it to see 7 and returns. This type of number(9831019) appears in any part of the string and is definitely more than 5 digits all the time and i want to give that as a condition UV7C11-F9-E1 MCS#9831019 MCS Lot #9512516" how do i go abt it Ramya -- View
2009 Mar 03
4
regular expression question
can someone show me how to use a regular expression to break the string at the bottom up into its three components : (-0.791,-0.263] (-38,-1.24] (0.96,2.43] I tried to use strplit because of my regexpitis ( it's not curable. i've been to many doctors all over NYC. they tell me there's no cure ) but it doesn't work because there also dots inside the brackets. Thanks.
2010 Feb 01
5
regular expression submatch?
What is the simplest way to extract a matched subexpression? Eg. in perl you can do "hello world" =~ m/hello (.*)/ which would return 1(true) and set $1 to the matched subexpression "world". -- View this message in context: http://n4.nabble.com/regular-expression-submatch-tp1459146p1459146.html Sent from the R help mailing list archive at Nabble.com.