cleanfp: Clean objects for forest

View source: R/clean.R

cleanfpR Documentation

Clean objects for forest

Description

Methods to handle cleaning of objects supported by forest.

Usage

cleanfp(x, ...)

## S3 method for class 'cleanfp'
print(x, ...)

## Default S3 method:
cleanfp(x, ...)

## S3 method for class 'coxph'
cleanfp(x, exp = TRUE, conf.int = 0.95, digits = 2L, format_pval = TRUE, ...)

## S3 method for class 'crr'
cleanfp(
  x,
  formula,
  data,
  exp = TRUE,
  conf.int = 0.95,
  digits = 2L,
  format_pval = TRUE,
  ...
)

## S3 method for class 'crr2'
cleanfp(
  x,
  which = 1L,
  exp = TRUE,
  conf.int = 0.95,
  digits = 2L,
  format_pval = TRUE,
  ...
)

## S3 method for class 'coxphf'
cleanfp(
  x,
  formula = x$call$formula,
  data,
  exp = TRUE,
  conf.int = 1 - x$alpha,
  digits = 2L,
  format_pval = TRUE,
  ...
)

## S3 method for class 'logistf'
cleanfp(
  x,
  formula = x$call$formula,
  data,
  exp = TRUE,
  conf.int = 1 - x$alpha,
  digits = 2L,
  format_pval = TRUE,
  ...
)

## S3 method for class 'glm'
cleanfp(x, exp = TRUE, conf.int = 0.95, digits = 2L, format_pval = TRUE, ...)

## S3 method for class 'table'
cleanfp(x, conf.int = 0.95, digits = 2L, format_pval = TRUE, ...)

## S3 method for class 'formula'
cleanfp(
  formula = formula(data),
  data,
  conf.int = 0.95,
  digits = 2L,
  format_pval = TRUE,
  order = c("p.value", "coef", "none"),
  decreasing = FALSE,
  ...
)

## S3 method for class 'lm'
cleanfp(x, conf.int = 0.95, digits = 2L, format_pval = TRUE, ...)

Arguments

x

an object or formula

...

additional arguments passed to or from other methods

exp

logical; if TRUE, estimates will be exponentiated

conf.int

the confidence level

digits

the number of digits past the decimal to keep

format_pval

logical or a function used to format p-values to character strings

formula

a formula

data

a data frame with variables in formula and/or used to fit x

which

for crr2 objects, the index of x that will be plotted (default is 1, i.e., x[[1]])

order

variable used to order the results, one of "p.value", "coef", or "none" for no re-ordering

decreasing

logical; if TRUE, results are sorted by order in decreasing order

See Also

see forest for examples


raredd/forest documentation built on Feb. 19, 2024, 9:22 p.m.