Learn R Programming

arsenal (version 0.5.0)

as.data.frame.modelsum: as.data.frame.modelsum

Description

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

Usage

# S3 method for modelsum
as.data.frame(x, ..., title = NULL,
  labelTranslations = NULL, digits = NA, nsmall = NA, nsmall.ratio = NA,
  digits.test = NA, show.intercept = NA, show.adjust = NA,
  pFootnote = TRUE)

Arguments

x

An object of class modelsum.

...

Other arguments (not implemented a this time).

title

Title for the table, defaults to NULL (no title)

labelTranslations

A named list (or vector) where the name is the label in the output to be replaced in the pretty rendering of modelsum by the character string value for the named element of the list, e.g., list(age = "Age(years)", medsurv = "Median Survival"). This applies to the statistic labels and the variable labels in the output.

digits

Maximum number of digits to display for floating point numbers. If NA (default), it uses the value from object$control$digits (whose default is 3, which would result in, e.g., 12.3, 1.23, 0.123, and 0.012).

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.ratio

Minimum number of digits to the right of the decimal point to display for the ratio statistics (OR, HR, RR). If NA (default) it uses the value from object$control$nsmall.ratio (whose default is 2). Allowed values are 0 <= nsmall.ratio <= 20.

digits.test

Number of digits to display for a p-value. Default is 5 (e.g. 0.12345).

show.intercept

Logical, denoting if the intercept should be shown for each line

show.adjust

Logical, denoting if the adjust variables should be shown for each line.

pFootnote

Logical denoting if a footnote should be added describing the test used to generate the p value. Default is TRUE.

Value

A data.frame holding the modelsum