great! Thanks
- Original Message -
From: David Winsemius
To: raje...@cse.iitm.ac.in
Cc: r-help
Sent: Wed, 15 Sep 2010 21:12:27 +0530 (IST)
Subject: Re: [R] characters in a string
On Sep 15, 2010, at 11:16 AM, raje...@cse.iitm.ac.in wrote:
>
> Hi,
>
> I need to check if a
On Sep 15, 2010, at 11:16 AM, raje...@cse.iitm.ac.in wrote:
Hi,
I need to check if a string "a,b,c,d" is delimited by two
"" 's as efficiently as possible(I need to do this a lot of
times) and return TRUE. Can someone suggest a good technique?
> txt <- "a,b,c,d"
>
> grep("^.+$", txt)
[1
Le 15/09/10 17:16, raje...@cse.iitm.ac.in a écrit :
Hi,
I need to check if a string "a,b,c,d" is delimited by two"" 's as
efficiently as possible(I need to do this a lot of times) and return TRUE. Can someone suggest a good technique?
Hi Rajesh,
> f <- function( x ) grepl( "^.*$", x )
> f(
On Sep 15, 2010, at 10:16 AM, raje...@cse.iitm.ac.in wrote:
>
> Hi,
>
> I need to check if a string "a,b,c,d" is delimited by two "" 's
> as efficiently as possible(I need to do this a lot of times) and return TRUE.
> Can someone suggest a good technique?
See ?grep and ?regex
> grepl("^.*$
Hi,
I need to check if a string "a,b,c,d" is delimited by two "" 's as
efficiently as possible(I need to do this a lot of times) and return TRUE. Can
someone suggest a good technique?
[[alternative HTML version deleted]]
__
R-help@r-project.
5 matches
Mail list logo