[R] gsub pattern?
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Fri Jan 21 11:05:59 CET 2005
Christian Schulz <ozric at web.de> writes:
> Hi,
>
> search in web for regular expressions i get the information that
> the line below replace all AUTO string's like AUTOBAHN
> ,AUTORENNEN with 1 but nothing happend.
> Using the [] in the pattern it works like i'm expected, but i didn't
> want single character replacment. Where is my mistake?
>
> bcode <- gsub("/^AUTO.*/","1",MyStringVector,ignore.case=T,extended=T)
What are the "/"-es for?
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list