check_ct_col | R Documentation |
This function checks the column in the dataset only contains the control terminology as defined by the metacore specification
check_ct_col(data, metacore, var, na_acceptable = NULL)
data |
Data to check |
metacore |
A metacore object to get the codelist from. If the variable
has different codelists for different datasets the metacore object will
need to be subsetted using |
var |
Name of variable to check |
na_acceptable |
Logical value, set to |
Given data if column only contains control terms. If not, will error given the values which should not be in the column
library(metacore)
library(haven)
library(magrittr)
load(metacore_example("pilot_ADaM.rda"))
spec <- metacore %>% select_dataset("ADSL")
data <- read_xpt(metatools_example("adsl.xpt"))
check_ct_col(data, spec, TRT01PN)
check_ct_col(data, spec, "TRT01PN")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.