I've been trying to create a function in R that lets me change string values:

So for example I have entries "12" in my dataframe and I want to change these values to "1-2" using a function() and then applying them to my dataframe using apply()

I've tried this:

```
mistake_fix<- function() {

df$column1<-  replace(column1, "12", "1-2")

df$column1<- replace(column1, "67", "6-7")

}

```

And then to apply it to my dataframe

```
%>% apply(MARGIN =2, FUN= mistake_fix)

```

Clearly there is something wrong as r keeps telling me it cannot find object "column1"
Can anyone help me?