[R] Quick GREP challenge

Dimitri Shvorob dimitri.shvorob at gmail.com
Thu Aug 26 12:16:13 CEST 2010


> grep("f[0-9]+=", "f1=5,f22=3,", value = T)
[1] "f1=5,f22=3,"

How do I make the line output c("f1", "f22") instead? (Actually, c(1,22)
would be even better).

Thank you.

 
-- 
View this message in context: http://r.789695.n4.nabble.com/Quick-GREP-challenge-tp2339486p2339486.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list