Thanks, this what I was looking for.
From: Henrique Dallazuanna
Cc: r-help@r-project.org
Sent: Friday, August 28, 2009 1:42:25 PM
Subject: Re: [R] regexp help needed.
See this example:
Str <- c("345asd", "31qwe", "234tyu"
See this example:
Str <- c("345asd", "31qwe", "234tyu", "40kjhg")
grep("^3", Str, value = TRUE)
split(Str, substr(Str, 1, 1))
On Fri, Aug 28, 2009 at 7:29 AM, Carlos Gonzalo Merino Mendez <
carlosgmer...@yahoo.com> wrote:
> Hi,
>
> I posted yesterday with a problem in a script. I still have the
Hi,
I posted yesterday with a problem in a script. I still have the same problem,
but I think I found a better way to explain my problem.
I have a vector of character strings. Each string is unique, including numbers
and letters. In the real world they represent a list of codes, so each positio
On Fri, Nov 28, 2008 at 5:51 AM, Peter Dalgaard
<[EMAIL PROTECTED]> wrote:
> Lauri Nikkinen wrote:
>> Hello,
>>
>> I have a vector of dates and I would like to grep the year component
>> from this vector (= all digits
>> after the last punctuation character)
>>
>> dates <- c("28.7.08","28.7.2008","
Lauri Nikkinen wrote:
> Hello,
>
> I have a vector of dates and I would like to grep the year component
> from this vector (= all digits
> after the last punctuation character)
>
> dates <- c("28.7.08","28.7.2008","28/7/08", "28/7/2008", "28/07/2008",
> "28-07-2008", "28-07-08")
>
> the resultin
Lauri Nikkinen:
> Hello,
>
> I have a vector of dates and I would like to grep the year component
> from this vector (= all digits
> after the last punctuation character)
>
> dates <- c("28.7.08","28.7.2008","28/7/08", "28/7/2008", "28/07/2008",
> "28-07-2008", "28-07-08")
>
> the resulting vect
Hello,
I have a vector of dates and I would like to grep the year component
from this vector (= all digits
after the last punctuation character)
dates <- c("28.7.08","28.7.2008","28/7/08", "28/7/2008", "28/07/2008",
"28-07-2008", "28-07-08")
the resulting vector should look like
"08" "2008" "08
7 matches
Mail list logo