[R] data manipulation

Henrique Dallazuanna wwwhsd at gmail.com
Thu Dec 3 15:15:24 CET 2009


Try this:

gsub(".*[^0-9]", "", header)


On Thu, Dec 3, 2009 at 12:00 PM, oscar linares <winsaam at gmail.com> wrote:
> Dear Wiza[R]ds,
>
> I have a data.frame header that looks like this:
>
> v2FfaPre15    v2FfaPre10    v2FfaPre5    v2Ffa2    v2Ffa3    v2Ffa4
>
> I need it to look like this,
>
> 15    10    5    2    3     4
>
> i.e., with v2FfaPre and  v2Ffa stripped off
>
> Any suggestions,
>
> Thanks in advance!
>
> --
> Oscar
> Oscar A. Linares, MD
> Translational Medicine Unit
> LaPlaisance Bay, Bolles Harbor
> Monroe, Michigan 48161
>
> Department of Medicine,
> University of Toledo College of Medicine
> Toledo, OH 43606-3390
>
> Department of Internal Medicine,
> The Detroit Medical Center (DMC)
> Harper University Hospital
> Wayne State University School of Medicine
> Detroit, Michigan 48201
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O




More information about the R-help mailing list