[R] gsub

Alfredo Alessandrini alfreale74 at gmail.com
Fri Aug 6 17:14:04 CEST 2010


Hi,

I'm using gsub, but I've a problem.

> print(i)
[1] "piante_venere.csv"
> gsub("\\.csv$", "", i)
[1] "piante_venere"
> gsub("^piante_", "", i)
[1] "venere.csv"


Can I combine the two expressions? 

Like this:

> gsub(.....)
[1] "venere"

Thanks,

Alfredo
-- 
View this message in context: http://r.789695.n4.nabble.com/gsub-tp2316443p2316443.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list