Updated for new version

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-09-23 12:23:51 +02:00
commit 61538a8dd5
No known key found for this signature in database
13 changed files with 92 additions and 25 deletions

View file

@ -0,0 +1,20 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/validation.R
\name{corr_pairs_validate}
\alias{corr_pairs_validate}
\title{Correlation pairs validation}
\usage{
corr_pairs_validate(data)
}
\arguments{
\item{data}{data.frame}
}
\value{
data.frame
}
\description{
Correlation pairs validation
}
\examples{
# correlation_pairs(mtcars) |> corr_pairs_validate()
}

24
man/correlation_pairs.Rd Normal file
View file

@ -0,0 +1,24 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/correlations-module.R
\name{correlation_pairs}
\alias{correlation_pairs}
\title{Determine significant correlations in the data set}
\usage{
correlation_pairs(data, threshold = 0.8)
}
\arguments{
\item{data}{data.frame}
\item{threshold}{correlation threshold}
}
\value{
data.frame
}
\description{
Determine significant correlations in the data set
}
\examples{
correlation_pairs(mtcars)
correlation_pairs(mtcars,.9)
correlation_pairs(mtcars[c(1:4),])
}

View file

@ -21,15 +21,16 @@ Create validation data.frame
i18n <- shiny.i18n::Translator$new(translation_csvs_path = here::here("inst/translations"))
i18n$set_translation_language("en")
df_original <- mtcars
df_original[1,2:4] <- NA
df_obs <- df_original |> dplyr::filter(carb==4)
df_original[1, 2:4] <- NA
df_obs <- df_original |> dplyr::filter(carb == 4)
df_vars <- df_original[1:7]
val <- purrr::map2(
.x = validation_lib(),
.y = list(
list(x = df_original, y = df_obs),
list(x = df_original, y = df_vars),
list(x=df_original)),
list(x = df_original, y = df_obs),
list(x = df_original, y = df_vars),
list(x = df_original)
),
make_validation
)
val |> make_validation_alerts()

19
man/mcar_validate.Rd Normal file
View file

@ -0,0 +1,19 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/validation.R
\name{mcar_validate}
\alias{mcar_validate}
\title{MCAR validation based on a gtsummary table bady}
\usage{
mcar_validate(data, outcome = NULL)
}
\arguments{
\item{data}{data}
\item{outcome}{outcome variable}
}
\value{
data.frame
}
\description{
MCAR validation based on a gtsummary table bady
}

View file

@ -17,6 +17,6 @@ Validate function of missingness in data
}
\examples{
df <- mtcars
df[1,2:4] <- NA
df[1, 2:4] <- NA
missings_validate(df)
}