0

I want to remove two special characters from the vector in one line of code

 col1<-c("0;13:14"  "0:12\"22")

I don't want to do this though it works

df$Col1<- 
  gsub(";",":",df$Col1)

df$Col1<- 
  gsub("\",":",df$Col1)

Is there a way to replace ";" or "" with ":" in one gsub line?

user35131
  • 1,105
  • 6
  • 18

0 Answers0