mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
moving towards first working state
This commit is contained in:
parent
05b37b76b3
commit
4c0a19f09f
14 changed files with 75 additions and 1695 deletions
17
man/argsstring2list.Rd
Normal file
17
man/argsstring2list.Rd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/helpers.R
|
||||
\name{argsstring2list}
|
||||
\alias{argsstring2list}
|
||||
\title{Convert string of arguments to list of arguments}
|
||||
\usage{
|
||||
argsstring2list(string)
|
||||
}
|
||||
\arguments{
|
||||
\item{string}{string to convert to list to use with do.call}
|
||||
}
|
||||
\value{
|
||||
list
|
||||
}
|
||||
\description{
|
||||
Idea from the answer: https://stackoverflow.com/a/62979238
|
||||
}
|
||||
|
|
@ -6,11 +6,11 @@
|
|||
\usage{
|
||||
regression_model(
|
||||
data,
|
||||
outcome.str = "gear",
|
||||
outcome.factor = TRUE,
|
||||
outcome.str,
|
||||
auto.mode = TRUE,
|
||||
formula.str = NULL,
|
||||
args.list = list(Hess = TRUE, method = "logistic"),
|
||||
fun = "MASS::polr",
|
||||
args.list = NULL,
|
||||
fun = NULL,
|
||||
vars = NULL
|
||||
)
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ regression_model(
|
|||
|
||||
\item{outcome.str}{Name of outcome variable. Character vector.}
|
||||
|
||||
\item{outcome.factor}{Factorize outcome variable. Logical.}
|
||||
\item{auto.mode}{Make assumptions on function dependent on outcome data format.}
|
||||
|
||||
\item{formula.str}{Formula as string. Passed through 'glue::glue'. If given, 'outcome.str' and 'vars' are ignored. Optional.}
|
||||
|
||||
|
|
@ -37,11 +37,10 @@ Print a flexible baseline characteristics table
|
|||
}
|
||||
\examples{
|
||||
gtsummary::trial |>
|
||||
regression_model(outcome.str = "stage", fun = "MASS::polr")
|
||||
regression_model(outcome.str = "age")
|
||||
gtsummary::trial |>
|
||||
regression_model(
|
||||
outcome.str = "age",
|
||||
outcome.factor = FALSE,
|
||||
fun = "stats::lm",
|
||||
formula.str = "{outcome.str}~.",
|
||||
args.list = NULL
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ gtsummary::trial |>
|
|||
gtsummary::trial |>
|
||||
regression_model(
|
||||
outcome.str = "age",
|
||||
outcome.factor = FALSE,
|
||||
fun = "stats::lm",
|
||||
formula.str = "{outcome.str}~.",
|
||||
args.list = NULL
|
||||
|
|
@ -41,5 +40,5 @@ gtsummary::trial |>
|
|||
fun = "stats::glm",
|
||||
args.list = list(family = binomial(link = "logit"))
|
||||
) |>
|
||||
regression_table(args.list = list(exponentiate = TRUE))
|
||||
regression_table()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue