mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
This commit is contained in:
parent
b3434d9dfb
commit
347490605f
20 changed files with 573 additions and 538 deletions
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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
23
man/expression_string.Rd
Normal 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
23
man/merge_expression.Rd
Normal 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()
|
||||
}
|
||||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue