-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model_dashboard
: export code used to produce all the outputs
#284
Comments
My bad, I missed the "source code" button |
Actually the "source code" button shows the source for the Rmd file, but I was thinking of something like: # Assumption checks -------------
*Some code here*
# Indices of model fit -------------
*Some code here*
# Tabular summary -------------
*Some code here*
[...] |
This should be simple enough. We just need to use |
For example, suppose that there are interactions in the model, then this if condition : if (is.null(int_terms)) {
model_terms <- con_terms
} else {
model_terms <- clean_names(int_terms)
int_terms <- unique(unlist(strsplit(clean_names(int_terms), ":", fixed = TRUE)))
model_terms <- c(model_terms, setdiff(con_terms, int_terms))
} could be reduced to: model_terms <- clean_names(int_terms)
int_terms <- unique(unlist(strsplit(clean_names(int_terms), ":", fixed = TRUE)))
model_terms <- c(model_terms, setdiff(con_terms, int_terms)) in the exported code. In the end, I have in mind a text output that doesn't contain any of the conditions/ params <- list(model = "model", check_model_args = "check_model_args",
parameters_args = "parameters_args", performance_args = "performance_args")
#### Assumption checks -----------
do.call(performance::check_model, check_model_args)
#### Indices of model fit -----------
performance_args <- c(list(model), params$performance_args)
# add verbose, if not done yet
if (is.null(performance_args$verbose)) performance_args$verbose <- FALSE
table_performance <- do.call(performance::performance, performance_args)
print_md(table_performance, layout = "vertical", caption = NULL)
... |
It would be nice to have an additional tab containing code that can simply be copy-pasted in R and produces the same outputs
The text was updated successfully, but these errors were encountered: