Reputation: 333
I am encountering suddenly this odd error, which I have never come across before in write.table()
command:
write.table(items,file="E:/CFA/items.dat",sep="\t",row.names=F,col.names=F)
Error in write.table(items, file = "E:/CFA/items.dat", :
invalid 'row.names' specification
When taking away the row.names
argument, there is still the same error with col.names
one. The data is a data frame which I have already worked with several times with no difficulties to create a .dat
file. I am just puzzled.
Does anybody have a clue why it's happening now?
Thanks beforehand
Upvotes: 3
Views: 3430
Reputation: 157
Try write.table(items,file="E://CFA//items.dat",sep="\t",row.names=F,col.names=F)
or rm(F,T) and then your command.
Upvotes: 1
Reputation: 1178
Is it possible you have reassigned the F variable somewhere? Try doing it using FALSE
instead of F.
write.table(items,file="E:/CFA/items.dat",sep="\t",row.names=FALSE,col.names=FALSE)
Upvotes: 7