Dataframe:
a<- as.character(rep("Sick (Atlas) (7:24)", 6))
b<- as.character(rep("20/08/2014", 6))
id<- as.character(rep("234", 6))
df<- data.frame(a,b,id)
df$a<-as.character(df$a)
I would like to remove (Atlas)
. I tried
df <- as.data.frame(sapply(df,gsub,pattern="(Atlas)",replacement=""))
but it removes only Atlas and leaves brackets:
After reading the help for gsub, I assume that brackets are not regular expressions. So I tried to use backslash, but it did not work either.
df <- as.data.frame(sapply(df,gsub,pattern="\(\Atlas\)\",replacement=""))
Any help would be much appreciated.