Try this:

library(gsubfn)
strapply("11 - 23", "\\d{1,3}", simplify = as.numeric)

On Thu, Dec 9, 2010 at 12:24 PM, Romildo Martins
<romildo.mart...@gmail.com>wrote:

> Hello,
>
> how convert x in xarray (numbers)?
>
> > x
> [1] "0 - 13"
> > y
> [1] "11 - 23"
> > z
> [1] "220 - 9"
> > xarray
> [1]  0 13
> > yarray
> [1] 11 23
> > zarray
> [1] 220   9
>
>
>
> Thanks,
>
> RMB
>
> ______________________________________________
> 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