[R] gsub

Sean Davis sdavis2 at mail.nih.gov
Thu Sep 23 16:11:39 CEST 2004


You might want to look at ?regex.

Sean

On Sep 23, 2004, at 10:03 AM, Jean Eid wrote:

> Hi
>
> A while back I used gsub to do the following
>
> temp<-"000US00231"
> gsub("something here", "", temp)
> "00231"
>
> I think it involved the `meta characters' somehow.
>
> I do not know how to do this anymore. I know strsplit will also work 
> but I
> remember gsub was much faster.  In essence the question is how to 
> delete
> all characters before a particular pattern.
>
> If anyone has some help file for this, it will be greatly appreciated.
>
>
> Jean Eid
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html




More information about the R-help mailing list