Skip to contents

Function tests the structure and returns notes when object does not conform to expected structure.

Usage

check_ard_structure(x, column_order = TRUE, method = TRUE)

Arguments

x

(data.frame)
an ARD data frame of class 'card'

column_order

(scalar logical)
check whether ordering of columns adheres to to cards::tidy_ard_column_order().

method

(scalar logical)
check whether a "stat_name" equal to "method" appears in results.

Value

an ARD data frame of class 'card' (invisible)

Examples

ard_continuous(ADSL, variables = "AGE") |>
  dplyr::select(-warning, -error) |>
  check_ard_structure()
#> The following columns are not present: "warning" and "error".
#> Expecting a row with `stat_name = 'method'`, but it is not present.