Hi,
I think you can make it work by combining gsub() and sapply() (or
lapply()), though I don't really know how (those *apply() functions are
still kind of a mystery for me).
Maybe someone else can help you
Ivan
Le 5/19/2010 12:35, Dani Valverde a écrit :
Hello,
Is there any function like g
Try this:
DF <- data.frame(a = head(letters), A = head(LETTERS))
DF[] <- lapply(DF, gsub, pattern = "a", replacement = "X")
m <- cbind(a = head(letters), A = head(LETTERS))
m[] <- gsub("a", "X", m)
In the future please provide test data and desired output as per
posting guide (see bottom of ever
Exactly how do you want to do that? (PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.)
Provide a before/after example of what you want. You could use the
'apply' functions.
On Wed, May 19, 2010 at 6:35
3 matches
Mail list logo