2
I am importing a csv file into the R and the name of each column is appearing the letter "X" before the original name. For example:
Field names in csv: 1.2_cidade
; 2_UF
.
Field names after import: X1.2_cidade
; X2_UF
.
How do I import without "X"?
Try
names(dados) <- sub("^X", "", names(dados))
. (dados
is the name of the data frame.)– Rui Barradas