Error in read.table: !header: invalid argument type

可紊 提交于 2019-12-19 09:26:08

问题


I am having the strangest of issues. The following code no longer works:

Test<-matrix(rnorm(9),ncol=3)
 colnames(Test)<-c("a","b","c")
 write.table(Test,file="Test.txt")
 d<-read.table("Test.txt",header=T)

I get:

Error in !header: invalid argument type

I tried rebooting R, it didn't help.


回答1:


Check class(T). Most likely T was overwritten with a non-boolean value. Restart of R probably loads the saved session.



来源:https://stackoverflow.com/questions/21775169/error-in-read-table-header-invalid-argument-type

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!