Wednesday, 7 August 2013

Replace elements of a vector in R

Replace elements of a vector in R

I would like to apply the replace function to each string element in a
vector. So if i had a vector that looks like this:
t <- c("a1", "a2", "a3_!", "a4_!", "a5")
i would like to replace all "!" in the strings with a value
Thank you in advance for the help

No comments:

Post a Comment