Learn R Programming

dccvalidator (version 0.3.0)

check_condition: Create a condition of the given type

Description

Create a condition of the given type

Usage

check_condition(msg, behavior, data, type)

Arguments

msg

Message to report

behavior

Statement of the correct behavior (i.e. what the higher level function was checking for)

data

Data to return (e.g. invalid values that need attention)

type

One of "check_pass", "check_warn", "check_fail"

Value

An S3 object of class "check_pass", "check_warn", or "check_fail"

Examples

Run this code
# NOT RUN {
strict <- TRUE
check_condition(
  msg = "Some data is missing",
  behavior = "Files should be complete",
  data = c("specimenID", "assay"),
  type = ifelse(strict, "check_fail", "check_warn")
)
# }

Run the code above in your browser using DataLab