Hello R-Experts,

I am a beginner to R. Can someone please look at my problem

I am trying to append the files in R but couldn't get the answer properly.

My code is

mat1<-matrix(0,2,3)
mat2<-matrix(1,2,3)

write.table(mat1,"foo.csv",sep=",",col.names=NA)
write.table(mat2,"foo.csv", sep=",", col.names=NA, append = TRUE)

I am getting a warning message:

Warning message:
appending column names to file in: write.table(mat2, "foo.csv", sep = ",",
col.names = NA, append = TRUE)

Moreover the data of *mat2* is getting appended to "foo.csv" in the
following way

       V1    V2     V3 1 0 0 0 2 0 0 0     V1    V2     V3 1 1 1 1 2 1 1 1

If data is getting appended then why I am getting the warning message?

Moreover is there any way by which i can get the data of *mat2* beside the
data of *mat1* instead of below?


Thanks and Regards,
Vaibhav Gathibandhe

	[[alternative HTML version deleted]]

