validateResultArgument: Validate if a an object is a valid 'summarised_result'...

View source: R/validate.R

validateResultArgumentR Documentation

Validate if a an object is a valid 'summarised_result' object.

Description

Validate if a an object is a valid 'summarised_result' object.

Usage

validateResultArgument(
  result,
  checkNoDuplicates = FALSE,
  checkNameLevel = FALSE,
  checkSuppression = FALSE,
  validation = "error",
  call = parent.frame()
)

Arguments

result

summarised_result object to validate.

checkNoDuplicates

Whether there are not allowed duplicates in the result object.

checkNameLevel

Whether the name-level paired columns are can be correctly split.

checkSuppression

Whether the suppression in the result object is well defined.

validation

Only error is supported at the moment.

call

parent.frame

Value

summarise result object

Examples

x <- dplyr::tibble(
  "result_id" = 1L,
  "cdm_name" = "eunomia",
  "group_name" = "cohort_name",
  "group_level" = "my_cohort",
  "strata_name" = c("sex", "sex &&& age_group", "sex &&& year"),
  "strata_level" = c("Female", "Male &&& <40", "Female &&& 2010"),
  "variable_name" = "number subjects",
  "variable_level" = NA_character_,
  "estimate_name" = "count",
  "estimate_type" = "integer",
  "estimate_value" = c("100", "44", "14"),
  "additional_name" = "overall",
  "additional_level" = "overall"
) |>
  newSummarisedResult()

validateResultArgument(x)


omopgenerics documentation built on April 3, 2025, 8:47 p.m.