Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

read.table

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.

like image 883
Pinemangoes Avatar asked Feb 14 '14 09:02

Pinemangoes


1 Answers

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

like image 114
Oleg Sklyar Avatar answered Sep 28 '22 03:09

Oleg Sklyar