feat: the missingness module was overhauled to include two different analysis methods and a better, standalone module
Some checks are pending
pkgdown.yaml / pkgdown (push) Waiting to run

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-12-11 09:34:40 +01:00
commit af523edc00
No known key found for this signature in database
25 changed files with 1049 additions and 720 deletions

View file

@ -4,7 +4,12 @@
\alias{compare_missings}
\title{Pairwise comparison of missings across covariables}
\usage{
compare_missings(data, by_var, max_level = 20)
compare_missings(
data,
by_var,
max_level = 20,
type = c("predictors", "outcome")
)
}
\arguments{
\item{data}{data frame}

View file

@ -6,13 +6,15 @@
\alias{data_missings_server}
\title{Data correlations evaluation module}
\usage{
data_missings_ui(id)
data_missings_ui(id, ...)
data_missings_server(id, data, variable, max_level = 20, ...)
data_missings_server(id, data, max_level = 20, ...)
}
\arguments{
\item{id}{Module id}
\item{...}{additional UI elements to show before the table overview}
\item{data}{data}
\item{output.format}{output format}

View file

@ -2,7 +2,7 @@
% Please edit documentation in R/data_plots.R
\name{get_label}
\alias{get_label}
\title{Print label, and if missing print variable name}
\title{Print label, and if missing print variable name for plots}
\usage{
get_label(data, var = NULL)
}
@ -15,7 +15,7 @@ get_label(data, var = NULL)
character string
}
\description{
Print label, and if missing print variable name
Print label, and if missing print variable name for plots
}
\examples{
mtcars |> get_label(var = "mpg")

View file

@ -0,0 +1,25 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/missings-module.R
\name{missings_logic_across}
\alias{missings_logic_across}
\title{Converting all variables to logicals by missing status}
\usage{
missings_logic_across(data, exclude = NULL)
}
\arguments{
\item{data}{data}
\item{exclude}{character vector of variable names to be excluded}
}
\value{
data frame
}
\description{
Converting all variables to logicals by missing status
}
\examples{
mtcars |> missings_logic_across("cyl")
## gtsummary::trial |>
## missings_logic_across() |>
## gtsummary::tbl_summary()
}

View file

@ -37,30 +37,30 @@ A selectizeInput customized for named vectors
}
\examples{
if (shiny::interactive()) {
shinyApp(
ui = fluidPage(
shiny::uiOutput("select"),
tableOutput("data")
),
server = function(input, output) {
output$select <- shiny::renderUI({
vectorSelectInput(
inputId = "variable", label = "Variable:",
data = c(
"Cylinders" = "cyl",
"Transmission" = "am",
"Gears" = "gear"
shinyApp(
ui = fluidPage(
shiny::uiOutput("select"),
tableOutput("data")
),
server = function(input, output) {
output$select <- shiny::renderUI({
vectorSelectInput(
inputId = "variable", label = "Variable:",
data = c(
"Cylinders" = "cyl",
"Transmission" = "am",
"Gears" = "gear"
)
)
)
})
})
output$data <- renderTable(
{
mtcars[, c("mpg", input$variable), drop = FALSE]
},
rownames = TRUE
)
}
)
output$data <- renderTable(
{
mtcars[, c("mpg", input$variable), drop = FALSE]
},
rownames = TRUE
)
}
)
}
}

View file

@ -54,7 +54,7 @@ shiny server
shiny modal
An \code{\link[=apexchart]{apexchart()}} \code{htmlwidget} object.
An \code{\link[apexcharter:apexchart]{apexcharter::apexchart()}} \code{htmlwidget} object.
ggplot2 object
}