The key is in the error message: "...can't coerce array into a data.frame" Even if as.data.frame.default is unhappy you can coerce m into a data.frame. write.table(data.frame(m1 = m[1], m2 = m[2]), file="C:\\R\\tst.txt", col.names=T, row.names=F, quote=F, append = FALSE) There's probably a nicer way to do the coercion but this works. HTH, Andy