I have an R data.table like below:
Date Notes 12/2/2018 Car Serviced 12/4/2018 Purchased grocery 12/5/2018 Purchase fuel
I want to change the encoding of the
I have the
Notes column in a variable name.
So far have tried
Encoding(dt[[colname]])<-"UTF-8" Error in `Encoding<-`(`*tmp*`, value = "UTF-8") : a character vector argument expected dt[, (colname):=enc2utf8(dt[,(colname)])]
Which unfortunately did not work either.
Also noticed that
Is a factor...
Any thoughts on how I can achieve this? Thanks!