
Last chance! 50% off unlimited learning
Sale ends in
Confront a RelDataModel to actual data
confront_data(
x,
data = list(),
paths = NULL,
returnData = FALSE,
verbose = TRUE,
n_max = Inf,
checks = if (n_max == Inf) {
c("unique", "not nullable", "foreign keys")
} else
{
as.character()
},
delim = "\t",
...
)
A report as a list
a RelDataModel
a list of data frames to be confronted with the model.
a character vector with file paths taken into account if the data is empty. The file basename without extension will be considered as the table name.
a logical indicating if the data should be returned with the report (default: FALSE).
a single logical value indicating if some process information should be displayed (default: TRUE)
maximum number of records to read (default: Inf).
a character vector with the name of optional checks to be done (Default: if n_max==Inf ==> all of them c("unique", "not nullable", "foreign keys"), else ==> none)
single character used to separate fields within a record (default: "\t")
supplementary parameters for the readr::read_delim function.
## Read the model ----
hpo_model <- read_json_data_model(
system.file("examples/HPO-model.json", package="ReDaMoR")
)
## Confront to data ----
confrontation_report <- confront_data(
hpo_model,
path=list.files(
system.file("examples/HPO-subset", package="ReDaMoR"),
full.names=TRUE
),
returnData=TRUE
)
Run the code above in your browser using DataLab