Description Usage Arguments Examples
Prints on or more lists of regression models to HTML. Currently only works with class coxph.
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;")
|
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
|
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. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.