confront_data {ReDaMoR} | R Documentation |
Confront a RelDataModel to actual data
Description
Confront a RelDataModel to actual data
Usage
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",
...
)
Arguments
x |
|
data |
a list of data frames to be confronted with the model. |
paths |
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. |
returnData |
a logical indicating if the data should be returned with the report (default: FALSE). |
verbose |
a single logical value indicating if some process information should be displayed (default: TRUE) |
n_max |
maximum number of records to read (default: Inf). |
checks |
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) |
delim |
single character used to separate fields within a record (default: "\t") |
... |
supplementary parameters for the readr::read_delim function. |
Value
A report as a list
Examples
## 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
)