| DataCheck | R Documentation |
Checks the columns, values, visit structure, and analysis settings specified
by mapping. Every observed time from baseline through the cutoff is treated
as an analysis time, and the input data are left unchanged.
DataCheck(data, mapping, strict = FALSE)
data |
A long-format data frame. |
mapping |
A |
strict |
If |
A pd_data_check list with the following components:
TRUE when no check classified as an error fails. Some
warnings about encoding or ordering may still prevent analysis.
TRUE when the data pass every check required
for analysis.
TRUE when a failed check requires
the user to correct the data before standardization.
TRUE when no problem requires manual correction.
Standardization can still fail if rows must be removed but drop = FALSE,
or if removal leaves no observations or only one treatment group.
A data frame with one row per performed check, including the result, its importance, details, and a recommended action.
A list containing the validated mapping.
Detailed row indices, subject identifiers, and summary tables for the performed checks. Missing columns or empty input cause an early return with only the checks possible at that stage.
Numeric summaries intended for display are rounded to three decimals; counts, row indices, identifiers, and logical flags retain their types.
data("BiSample", package = "PDRobust")
map <- Mapping(
id = "id", time = "time", treatment = "A",
survival = "S", outcome = "Y",
baseline_time = 0, cutoff_time = 2,
covariates = c("X1", "X2", "X4"),
interest_vars = c("X1", "X2"), y_type = "B"
)
check <- DataCheck(BiSample, map)
check$ready_for_analysis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.