or, gsub('V','',vn)
On 8/10/2011 2:23 PM, Peter Langfelder wrote: > 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. [[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.