Thanks, this what I was looking for.



________________________________
From: Henrique Dallazuanna <www...@gmail.com>

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", "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 <carlosgmerin

>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 position in the string has a meaning to me. I want to make a subset of 
>>the vector using "wildcards". So for example, take all the strings that start 
>>with 3.
>
>>Any ideas how to do that?
>
>>Thanks for any help.
>
>
>
>
>>        [[alternative HTML version deleted]]
>
>>______________________________________________
>R-help@r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>and provide commented, minimal, self-contained, reproducible code.
>


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



      
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to