Skip to contents

Measures the facts validate_config checks a config against: dimensions, column types, distinct and missing counts per column, level counts for low-cardinality categorical columns, and the number of complete cases.

Usage

data_profile(x, n_duplicates = TRUE, fingerprint = FALSE)

Arguments

x

tabular data: The dataset.

n_duplicates

Logical: If TRUE, count rows that repeat an earlier row. The one whole-table operation here; FALSE leaves the field NULL.

fingerprint

Logical: If TRUE, record a data_fingerprint of x. Hashes the whole dataset, so it is off by default.

Value

DataProfile object.

Details

One pass per column and no copy of the data, so profiling is cheap enough to do per validation.

Author

EDG

Examples

p <- data_profile(iris)
p@columns
#>           name       dtype n_distinct n_missing
#> 1 Sepal.Length      number         35         0
#> 2  Sepal.Width      number         23         0
#> 3 Petal.Length      number         43         0
#> 4  Petal.Width      number         22         0
#> 5      Species categorical          3         0
p@level_counts
#>    column      level  n
#> 1 Species     setosa 50
#> 2 Species versicolor 50
#> 3 Species  virginica 50