Hello All,
Thanks in advance for all help
I have the following vector of strings that I want to split..

> y = c("1/1","2/2", "3/3", "4/4")
> y
[1] "1/1" "2/2" "3/3" "4/4"
> z = strsplit(y,"/")
> z
[[1]]
[1] "1" "1"

[[2]]
[1] "2" "2"

[[3]]
[1] "3" "3"

[[4]]
[1] "4" "4"

Now how do I convert all elements of z to an interger.. (currently t, it is of 
type character)
I believe sapply is the correct function, but don't know what the syntax is.

Thanks
Shank


        [[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