Skip to content
Prev 156940 / 398506 Next

print.data.frame : row.name = FALSE not having intended effect

On 24/09/2008, at 1:55 PM, Matthew Pettis wrote:

            
Why not just upgrade?  It's painless, and should be done anyhow.

Be that as it may, here's the code for print.data.frame from R 2.7.2:

function (x, ..., digits = NULL, quote = FALSE, right = TRUE,
     row.names = TRUE)
{
     n <- length(row.names(x))
     if (length(x) == 0L) {
         cat("NULL data frame with", n, "rows\n")
     }
     else if (n == 0L) {
         print.default(names(x), quote = FALSE)
         cat("<0 rows> (or 0-length row.names)\n")
     }
     else {
         m <- as.matrix(format.data.frame(x, digits = digits,
             na.encode = FALSE))
         if (!isTRUE(row.names))
             dimnames(m)[[1]] <- if (identical(row.names, FALSE))
                 rep.int("", n)
             else row.names
         print(m, ..., quote = quote, right = right)
     }
     invisible(x)
}

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}