I'm trying to replace a certain string in a large data.frame. I just found the following solution but gsub
doesn't preserve the original data.frame layout. How can I achieve this.
I mean I want to replace a string and don't want to change the layout of the df.
Consider this example:
test<-data.frame(a=c("a","b","c","d"),b=c("a","e","g","h"),c=c("i","j","k","a"))
gsub("a","new",test)
Thx