Some columns in my data frame have ',' and some have '.' as decimal separator.
DateTime a b c
2000-01-01 00:30:00 3,4 6,1 9.5
2000-01-01 00:45:00 3,5 6,8 7.4
I would like to have '.' as a decimal separator throughout my data frame.
I have tried
df = gsub(',','.',df)
but it just gives me a new Value
instead of a data frame. I also tried
df = lapply(df, function(x) as.character(gsub(",",".",df)))
but it just makes a list.
I have tried to set the columns as numeric (currently they're all characters due to earlier procedures), but it sets all values in a and b as NA.