model_to_html: Print regression models to HTML

Description Usage Arguments Examples

Description

Prints on or more lists of regression models to HTML. Currently only works with class coxph.

Usage

1
2
3
model_to_html(univariate_models_list, multivariate_models_list = NULL,
  decimals_estimate = 2, exponentiate = FALSE, cgroup_names = NULL,
  html_output = TRUE, font_css = "font-family: Times;")

Arguments

univariate_models_list

List of univariate models

multivariate_models_list

List of univariate models

decimals_estimate

A number specifying decimals on estimates. Default is 2.

exponentiate

logical. Sent to broom::tidy(). Defaults to FALSE. Set to TRUE to exponentiate coefficients and CI of model summary.

cgroup_names

A character vector of length equal to 1 + length of multivariate_models_list (if one is supplied).

html_output

logical. Defaults to TRUE. Set to false to output data.frame.

font_css

A string of CSS code defining the font used for the table. Default is 'font-family: Times;'. An example of another option is: 'font-family: "Courier New";' Only fonts supported by the browser are supported.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
df         <- survival::lung
df$age_bin <- Hmisc::cut2( df$age, g = 5)
df$ph_bin  <- Hmisc::cut2( df$ph.karno, g = 5)
df$sex     <- factor( df$sex)
model1     <- survival::coxph( survival::Surv( time , status==1) ~ ph_bin + wt.loss, data = df)

diamonds         <- example_data
diamonds$color   <- factor(diamonds$color, ordered = FALSE)
diamonds$clarity <- factor(diamonds$clarity, ordered = FALSE)
glm_logistic     <- glm( cut=="Ideal" ~  color + clarity + x , data = diamonds, family = "binomial")
glm_linear       <- glm( Sepal.Width ~  Petal.Width + Species, data = iris)

rasmusrhl/epitable documentation built on May 30, 2019, 7:04 p.m.