print.data.frame.lab: Print a labeled data frame

Usage Arguments Examples

Usage

1
print.data.frame.lab(x, ..., digits = NULL, quote = FALSE, right = TRUE)

Arguments

x
...
digits
quote
right

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x, ..., digits = NULL, quote = FALSE, right = TRUE) 
{
    labs <- attributes(x)$labs
    if (length(x) == 0) {
        cat("NULL data frame with", length(row.names(x)), "rows\n")
    }
    else if (length(row.names(x)) == 0) {
        print.default(names(x), quote = FALSE)
        cat("<0 rows> (or 0-length row.names)\n")
    }
    else {
        mat <- as.matrix(format.data.frame(x, digits = digits, 
            na.encode = FALSE))
        labs <- c(labs, "", "")
        labs <- labs[1:2]
        names(dimnames(mat)) <- labs
        print(mat, ..., quote = quote, right = right)
    }
    invisible(x)
  }

gmonette/spida documentation built on May 17, 2019, 7:25 a.m.