mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
format chr as factor and stratify baseline
This commit is contained in:
parent
f4be547ed0
commit
419faca242
5 changed files with 78 additions and 29 deletions
|
|
@ -15,7 +15,7 @@
|
|||
#'
|
||||
#' @examples
|
||||
#' gtsummary::trial |>
|
||||
#' regression_model(outcome.str = "age")
|
||||
#' regression_model(outcome.str = "age",)
|
||||
#' gtsummary::trial |>
|
||||
#' regression_model(
|
||||
#' outcome.str = "age",
|
||||
|
|
@ -35,7 +35,11 @@ regression_model <- function(data,
|
|||
args.list = NULL,
|
||||
fun = NULL,
|
||||
vars = NULL) {
|
||||
if (!is.null(formula.str) | formula.str != "") {
|
||||
if (formula.str==""){
|
||||
formula.str <- NULL
|
||||
}
|
||||
|
||||
if (!is.null(formula.str)) {
|
||||
formula.str <- glue::glue(formula.str)
|
||||
} else {
|
||||
assertthat::assert_that(outcome.str %in% names(data),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue