I am trying to write a dataframe as csv, which succeeds, but end up some fields with weird characters, Say for example 4.5×10−7 gives 4.5×10−7 in the csv file. After doing few research I used fileEncoding as "Windows-1252", but that dint help. Here is a reproducible code
name <- c('John Doe','Peter Gynn','Jolie Hope')
valuename <- c("4.5×10−7", "0.0006", "0.345")
df <- data.frame(name,valuename)
write.csv(df, "/Desktop/test.csv", row.names=FALSE)
Can anyone help me with a proper encoding or an alternative to take care of that field?