Compares an mdJSON data dictionary to a tabular dataset and summarizes discrepancies in a data frame.
Examples
# Import mdJSON data dictionary as list
path<-system.file("extdata", "e.g.dictionary2.json", package = "mdJSONdictio")
input.dxnry <- rjson::fromJSON(file = path)
# Import tabular dataset as data frame
path<-system.file("extdata", "e.g.dataset.csv", package = "mdJSONdictio")
input.data<-read.csv(file = path, na.strings = "", stringsAsFactors = FALSE)
# Validate list against data frame
all.warnings<- validate.mdJSON(x = input.dxnry, y = input.data, entity_num = 1)
# Export table to disk
write.csv(x = all.warnings, file = "e.g.warnings.csv")