[R] String Manipulation- Extract numerical and alphanumerical segment

Su C. sushikyc at gmail.com
Fri Feb 5 16:11:41 CET 2010


I am currently attempting to split a long list of strings (let's call it
"string.list") that is of the format:

"1234567.z3.abcdef-gh.12"

I have gotten it to:
"1234567"  "z3"  "abcdef-gh"  "12"
by use of the strsplit function.

This leaves me with each element of "string.list" having a split string of
the above format. What I'd like to do now is extract the first two strings
of each element in "string.list" -- the "1234567" and the "z3" -- and place
them into two separate lists, say, "firstsplit.numeric.list" and
"secondsplit.alphanumeric.list"

I'm having some trouble figuring out how to do this. Any help would be
greatly appreciated!
-- 
View this message in context: http://n4.nabble.com/String-Manipulation-Extract-numerical-and-alphanumerical-segment-tp1470301p1470301.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list