R:加载一个表的数字作为列标题全都错误地添加了一个X,如何解决? [英] R: loading a table with number as the column heading all were wrongly added a X, how to solve it?

查看:226
本文介绍了R:加载一个表的数字作为列标题全都错误地添加了一个X,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试加载一个表,其中一些列标题从一个数字开始,即55353,555xx,abvab,77agg



我在加载后发现文件,以数字开头的所有标题在它之前有一个X,即更改为X55353,X555xx,abvab,X77agg



我可以如何解决这个问题。请注意,并非所有列标题都以数字开头。我应该如何解决这个问题?



非常感谢

解决方案

可能通过在 read.table()调用中添加 check.names = FALSE 可以解决您的问题。 / p>

有关更多信息,请参阅?read.table


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

解决方案

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

For more information see ?read.table

这篇关于R:加载一个表的数字作为列标题全都错误地添加了一个X,如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆