Builds each dataset exactly as dataset_test() does and returns the traits rows that make its "traits table cannot pivot wider" check fail.

dataset_find_pivot_duplicates(
  dataset_ids,
  path_config = "config",
  path_data = "data"
)

Arguments

dataset_ids

Vector of dataset_id for sources to be tested

path_config

Path to folder containing configuration files

path_data

Path to folder containing data files

Value

Tibble of the offending rows from each dataset's traits table, with every column, grouped so that rows sharing a pivot cell are adjacent. number_of_duplicates is the number of rows sharing that cell, and exact_duplicate is TRUE for a row identical to another in every column – the rows a compiled database drops. Zero rows means every dataset passes the check.

Details

Use this rather than check_pivot_duplicates() on a compiled database to chase that failure. traits.use::bind_databases() drops rows that are identical in every column, so a dataset whose duplicates are exact copies fails dataset_test() but shows no duplicates once compiled. From traits.use 0.1.1 it warns when it drops them, naming each dataset and its count; this function finds the rows themselves.