Sometimes, when I import a text file into R, I get the character "ï" ¿"added to the first value of the first column. Does anyone know why this is?
For example, a text file with the values:
2011_21,3130
2010_51,4153
2011_16,3168
2010_20,3945
2012_38,2099
2012_17,2436
2010_40,2090
2011_2 ,1462
output the following results in R:
1st I read the file in:
ts_data <- read.csv("yr_wk sales.csv", header=FALSE)
head(ts_data)
This is the returned data:
V1 V2
1 2011_21 3130
2 2010_51 4153
3 2011_16 3168
4 2010_20 3945
5 2012_38 2099
6 2012_17 2436
Any good way to avoid this? Thank you for your help.
source
share