If I understand what you want (which I may very well not) you could use something like this:
If this is an example of your type of data: 564589,+ substr(x, 1, 6) as.numeric(x) Please try to post something more thorough if you would like a better answer. Sam -- View this message in context: http://r.789695.n4.nabble.com/extract-data-from-a-column-tp3609890p3610030.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.