Have you ever encountered this annoying symbol called BOM (ï..) in the first column of your data frame after you read a csv file?
This is a common pattern for files generated from Excel. The solution for this problem is to add the fileEncoding="UTF-8-BOM"
in the read.csv command as follows:
df <- read.csv("myfile.csv", fileEncoding="UTF-8-BOM")