code export works!
Some checks are pending
pkgdown.yaml / pkgdown (push) Waiting to run

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-09 12:31:08 +02:00
commit 347490605f
No known key found for this signature in database
20 changed files with 573 additions and 538 deletions

View file

@ -4,7 +4,7 @@
\alias{create_overview_datagrid}
\title{Create a data overview datagrid}
\usage{
create_overview_datagrid(data)
create_overview_datagrid(data, ...)
}
\arguments{
\item{data}{data}

View file

@ -19,7 +19,7 @@ data_summary_server(id, data, color.main, color.sec, ...)
\item{color.sec}{secondary color}
\item{...}{arguments passed to toastui::datagrid}
\item{...}{arguments passed to create_overview_datagrid}
}
\value{
Shiny ui module

23
man/expression_string.Rd Normal file
View file

@ -0,0 +1,23 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{expression_string}
\alias{expression_string}
\title{Deparses expression as string, substitutes native pipe and adds assign}
\usage{
expression_string(data, assign.str = "data <- ")
}
\arguments{
\item{data}{expression}
}
\value{
string
}
\description{
Deparses expression as string, substitutes native pipe and adds assign
}
\examples{
list(
rlang::call2(.fn = "select",!!!list(c("cyl","disp")),.ns = "dplyr"),
rlang::call2(.fn = "default_parsing",.ns = "FreesearchR")
) |> merge_expression() |> expression_string()
}

23
man/merge_expression.Rd Normal file
View file

@ -0,0 +1,23 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{merge_expression}
\alias{merge_expression}
\title{Merge list of expressions}
\usage{
merge_expression(data)
}
\arguments{
\item{data}{list}
}
\value{
expression
}
\description{
Merge list of expressions
}
\examples{
list(
rlang::call2(.fn = "select",!!!list(c("cyl","disp")),.ns = "dplyr"),
rlang::call2(.fn = "default_parsing",.ns = "FreesearchR")
) |> merge_expression()
}

View file

@ -138,6 +138,7 @@ gtsummary::trial |>
)
ls <- regression_model_list(data = default_parsing(mtcars), outcome.str = "cyl", fun.descr = "Ordinal logistic regression model")
summary(ls$model)
ls <- regression_model_list(data = default_parsing(mtcars), outcome.str = "mpg", fun.descr = "Linear regression model")
ls <- regression_model_list(data = default_parsing(gtsummary::trial), outcome.str = "trt", fun.descr = "Logistic regression model")
tbl <- gtsummary::tbl_regression(ls$model, exponentiate = TRUE)
@ -147,7 +148,7 @@ m <- gtsummary::trial |>
outcome.str = "trt",
fun = "stats::glm",
formula.str = "{outcome.str}~.",
args.list = list(family = stats::binomial(link = "logit"))
args.list = list(family = "binomial")
)
tbl2 <- gtsummary::tbl_regression(m, exponentiate = TRUE)
broom::tidy(ls$model)
@ -163,6 +164,7 @@ gtsummary::trial |>
lapply(broom::tidy) |>
dplyr::bind_rows()
ms <- regression_model_uv_list(data = default_parsing(mtcars), outcome.str = "mpg", fun.descr = "Linear regression model")
ms$code
lapply(ms$model, broom::tidy) |> dplyr::bind_rows()
}
}