On Wed, Aug 10, 2011 at 11:22 AM, Soyeon Kim <yunni0...@gmail.com> wrote: > Dear All, > > I have vn variable >> vn > [1] "V300" "V376" > What I want to get is > 300 376
as.numeric(substring(vn, 2)) HTH Peter ______________________________________________ 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.