Hi Erin,

this is one way:


Block <- c("5600-5699","6100-6199","9700-9799","9400-9499","8300-8399")

splBlock <- strsplit(Block,"-")

sapply(splBlock, "[", 1)



greetings,
Remko

--
View this message in context: 
http://r.789695.n4.nabble.com/strsplit-question-tp3896847p3896850.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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