moved app to correctly include in package and allow load with dataset

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-11-21 12:34:27 +01:00
commit 8e73992b39
No known key found for this signature in database
32 changed files with 5561 additions and 273 deletions

View file

@ -1,21 +0,0 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{file_extension}
\alias{file_extension}
\title{Helper to import files correctly}
\usage{
file_extension(filenames)
}
\arguments{
\item{filenames}{file names}
}
\value{
character vector
}
\description{
Helper to import files correctly
}
\examples{
file_extension(list.files(here::here(""))[[2]])[[1]]
file_extension(c("file.cd..ks", "file"))
}

14
man/panel_space.Rd Normal file
View file

@ -0,0 +1,14 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/app.R
\name{panel_space}
\alias{panel_space}
\title{Wrapping nav_spacer to avoid errors on dependencies when packaging}
\usage{
panel_space()
}
\value{
bslib object
}
\description{
Wrapping nav_spacer to avoid errors on dependencies when packaging
}

View file

@ -19,7 +19,7 @@ regression_model(
\item{outcome.str}{Name of outcome variable. Character vector.}
\item{auto.mode}{Make assumptions on function dependent on outcome data format.}
\item{auto.mode}{Make assumptions on function dependent on outcome data format. Overwrites other arguments.}
\item{formula.str}{Formula as string. Passed through 'glue::glue'. If given, 'outcome.str' and 'vars' are ignored. Optional.}
@ -41,12 +41,14 @@ gtsummary::trial |>
gtsummary::trial |>
regression_model(
outcome.str = "age",
auto.mode = FALSE,
fun = "stats::lm",
formula.str = "{outcome.str}~.",
args.list = NULL
)
gtsummary::trial |> regression_model(
outcome.str = "trt",
auto.mode = FALSE,
fun = "stats::glm",
args.list = list(family = binomial(link = "logit"))
)

View file

@ -25,7 +25,7 @@ gtsummary::trial |>
outcome.str = "stage",
fun = "MASS::polr"
) |>
regression_table(args.list = list(exponentiate = TRUE))
regression_table(args.list = list("exponentiate" = TRUE))
gtsummary::trial |>
regression_model(
outcome.str = "age",

26
man/shiny_webResearch.Rd Normal file
View file

@ -0,0 +1,26 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/app.R
\name{shiny_webResearch}
\alias{shiny_webResearch}
\title{Test version of the shiny_cast function to launch the app with a data set in
the environment.}
\usage{
shiny_webResearch(data = NULL, ...)
}
\arguments{
\item{data}{optional data set to provide for analysis}
\item{...}{arguments passed on to \code{shiny::runApp()}}
}
\value{
shiny app
}
\description{
Test version of the shiny_cast function to launch the app with a data set in
the environment.
}
\examples{
\dontrun{
mtcars |> shiny_webResearch(launch.browser = TRUE)
}
}