Question

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

Was it helpful?

Solution

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)

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top