Displaying 2 results from an estimated 2 matches for "makerownames".
2008 Mar 10
2
write.table with row.names=FALSE unnecessarily slow?
...src/library/utils, along the lines of
Index: write.table.R
===================================================================
--- write.table.R (revision 44717)
+++ write.table.R (working copy)
@@ -27,13 +27,18 @@
if(!is.data.frame(x) && !is.matrix(x)) x <- data.frame(x)
+ makeRownames <- is.logical(row.names) && !is.na(row.names) &&
+ row.names==TRUE
+ makeColnames <- is.logical(col.names) && !is.na(col.names) &&
+ col.names==TRUE
if(is.matrix(x)) {
## fix up dimnames as as.data.frame wo...
2018 Jul 05
0
write.table with quote=TRUE fails on nested data.frames
...!= 1L || is.na(quote)))
stop("'quote' must be 'TRUE', 'FALSE' or numeric")
quoteC <- if (is.logical(quote))
quote
else TRUE
qset <- is.logical(quote) && quote
if (!is.data.frame(x) && !is.matrix(x))
x <- data.frame(x)
makeRownames <- isTRUE(row.names)
makeColnames <- is.logical(col.names) && !identical(FALSE,
col.names)
if (is.matrix(x)) {
p <- ncol(x)
d <- dimnames(x)
if (is.null(d))
d <- list(NULL, NULL)
if (is.null(d[[1L...