-Original Message-
> From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
> Sent: Friday, March 13, 2009 2:18 PM
> To: Tan, Richard
> Cc: r-help@r-project.org
> Subject: Re: [R] search for string insider a string
>
> Try this. We use regexpr to get the positions
That works. I want the position just for the purpose of my later manual check.
Thanks a lot Gabor.
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: Friday, March 13, 2009 2:18 PM
To: Tan, Richard
Cc: r-help@r-project.org
Subject: Re: [R] search for
Try this. We use regexpr to get the positions and
strapply puts the values in list s. The unlist statement
converts NULL to NA and simplifies the list, s, to a
numeric vector. For more info on strapply see
http://gsubfn.googlecode.com
library(gsubfn) # strapply
x <- c"test1", "bcdtestblabla2.
3 matches
Mail list logo