I have a data frame
a <- runif (10)
b <- letters [1:10]
c <- c(rep ("A-B", 4), rep("A_C", 6))
data1 <- data.frame (a, b, c)
data1
And I wan to replace _
in A_C of column c for -
to have a data frame like data2:
z <- c(rep ("A-B", 4), rep("A-C", 6))
data2 <- data.frame (a, b, z)
data2
Do you know how I can do that?