I read csv file with fread. After that I rename one of column (the new name is My Id) using setnames() and I write.csv file. I open again with fread and everything is ok. But when I try to open with read.csv and type names() the column names appear to be My.Id Should I consider to include read.csv not to check logical variables names. How I can remove the dot between the column headings?
Asked
Active
Viewed 233 times
1 Answers
0
Column names are supposed to be valid R variable names. Try ?make.names to get some more information.
The reasoning is simple. Imagine trying to access that column. The normal syntax is df$colName. How would I do that easily with col Name? You might want them as different names when outputting them, but during use in R, you probably don't.

Steve Rowe
- 19,411
- 9
- 51
- 82