"Romildo Martins" <romildo.mart...@gmail.com> wrote in message 
news:aanlktinbiaexcobzyqdbtr62xr9q=kjvwaazaqi-k...@mail.gmail.com...
> 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
>
-----------------------------------------------------------------
> x <- "0 - 13"
> x
[1] "0 - 13"
> as.numeric(unlist(strsplit(x, "-")))
[1]  0 13

HTH

______________________________________________
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