I was able to change the encoding of a dataframe using the code provided in R- Changing encoding of column in dataframe?, but I would like to use map instead of a for loop,