Learn R Programming

arsenal (version 0.5.0)

as.data.frame.tableby: as.data.frame.tableby

Description

Build a data.frame from the tableby object and parameters, and return it

Usage

# S3 method for tableby
as.data.frame(x, ..., title = NULL,
  labelTranslations = NULL, digits = NA, nsmall = NA, nsmall.pct = NA,
  digits.test = NA, test = NA, test.pname = NA, total = NA)

Arguments

x

An object of class tableby.

...

Other arguments (not in use at this time).

title

Title that will appear on the top of the header in the pretty-table rendering of the tableby object

labelTranslations

A named list (or vector) where the name is the label in the output to be replaced in the pretty rendering of tableby by the character string value for the named element of the list, e.g., list(age = "Age(Years)", meansd = "Mean(SD)"). This applies to both the statistic labels and the variables from the formula.

digits

Digits to round for significant digits of numeric, non-integer values. If digits.test is not set, digits is used for that setting.

nsmall

Minimum number of digits to the right of the decimal point to display for floating point numbers. If NA (default), it uses the value from object$control$nsmall. Allowed non-NA values are 0 <= nsmall <= 20.

nsmall.pct

Minimum number of digits to the right of the decimal point to display for percent numbers. If NA (default), it uses the value from object$control$nsmall.pct.

digits.test

Significant digits by which to round for numeric test statistic p-values, if the test was performed.

test

Logical, denoting whether the "p value" value should be printed. If NA (default), it uses the value from object$control$test.

test.pname

Title for p-value (only matters if test is TRUE; default is "p value").

total

Logical, denoting whether to include the "total" value. If NA (default), it uses the value from object$control$total.

Value

Information is returned as a data.frame of the tableby