I want my function to:
- change the values in a column so that the ',' is a '.'
- convert that column to a double
I have tried many different forms of this equation but I keep getting the error "Unknown or uninitialised column"
convert_number <- function(data, column, y) {
a <- str_replace(data$column, ",", ".")
y <- as.double(data$column)
return(a)
}
How can I fix it?