Learn R Programming

safetyGraphics (version 1.1.0)

detectStandard: Detect the data standard used for a data set

Description

This function attempts to detect the clinical data standard used in a given R data frame.

Usage

detectStandard(data, includeFields = TRUE, domain = "labs")

Arguments

data

A data frame in which to detect the data standard

includeFields

specifies whether to check the data set for field level data in addition to columns. Default: TRUE.

domain

The data domain for the data set provided. Default: "labs".

Value

A list containing the matching "standard" from "standardMetadata" and a list of "details" describing each standard considered.

Details

This function compares the columns in the provided "data" with the required columns for a given data standard/domain combination. The function is designed to work with the SDTM and ADaM CDISC(<https://www.cdisc.org/>) standards for clinical trial data by default. Additional standards can be added by modifying the "standardMetadata" data set included as part of this package. Currently, "labs" is the only domain supported.

Examples

Run this code
# NOT RUN {
detectStandard(adlbc)[["standard"]] #adam
detectStandard(iris)[["standard"]] #none

# }
# NOT RUN {
  detectStandard(adlbc,domain="AE") #throws error. AE domain not supported in this release.
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab