R: loading a table with number as the column headi

2019-01-29 08:49发布

问题:

I am trying to load a table to R with some of the column heading start with a number, i.e. 55353, 555xx, abvab, 77agg

I found after loading the files, all the headings that start with a number has a X before it, i.e. changed to X55353, X555xx, abvab, X77agg

What can I do to solve this problem. Please kindly notice that not all column heading are start with a number. What should I do to solve this problem?

Many thanks

回答1:

Probably your issue will be solved by adding check.names=FALSE to your read.table() call.

For more information see ?read.table