Re: [R] sub / gsub - extracting between identical symbols

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Thu, 20 Nov 2008 08:17:34 -0200

Try this:

unlist(strsplit("12/01/03/08", "/"))

On Thu, Nov 20, 2008 at 6:08 AM, Daniel Malter <daniel_at_umd.edu> wrote:

> Hi, I am trying to extract some numbers from a text string. The problem is
> that the delimiting symbols are identical so that I do not know how to tell
> "sub" between which of them to extract.
>
> The string looks like this
>
> 12/01/03/08
>
> The extracted variables should look like:
>
> x1=12
> x2=01
> x3=03
> x4=08
>
> If anybody could help or point me to useful help, I would be greatful.
>
> Cheers,
> Daniel
>
> -------------------------
> cuncta stricte discussurus
>
> ______________________________________________
> R-help_at_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_at_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.

Received on Thu 20 Nov 2008 - 10:22:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 20 Nov 2008 - 18:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive