The code > m <- matrix(1,2,2) > write.table(m,'test.txt')
writes out a file that looks like this: "X1" "X2" "1" "1" "1" "2" "1" "1" According ?write.table, factors and character vectors should be quoted by default, but this is quoting the numbers as well. Also according to the docs, the matrix m would be treated as data.frame(m), but if a true data frame is passed in, the numbers don't get quoted. The bug is due to the "else" near the beginning of write.table: if(!is.data.frame(x)) x <- data.frame(x) else if(is.logical(quote) && quote) quote <- which(unlist(lapply(x, function(x) is.character(x) || is.factor(x)))) However, that looks intentional to me. Is it really? Duncan Murdoch ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel