Return the audit table of a corrected manifest or a cohort
Source:R/corrections.R
corrections_log.RdFor a manifest, reads the "corrections" attribute that
apply_corrections() sets. For a Cohort, returns the audit it was built
with (see the corrections argument of cohort_new()).
Arguments
- x
A manifest, corrected or not, or a Cohort.
Value
A tibble with columns level, id, column, old_value,
new_value, reason, and n_rows. It has no rows when x has not been
corrected.
Details
validate_manifest() builds new tables and drops the attribute. Pass
corrections_log(corrected) to cohort_new() to keep the audit in the
cohort. read_study_yaml() does this for you.
Examples
manifest <- tibble::tibble(subject_id = "R1", sample_id = "R1_T")
corrections_log(manifest)
#> # A tibble: 0 × 7
#> # ℹ 7 variables: level <chr>, id <chr>, column <chr>, old_value <chr>,
#> # new_value <chr>, reason <chr>, n_rows <int>
data(example_cohort)
corrections_log(example_cohort)
#> # A tibble: 0 × 7
#> # ℹ 7 variables: level <chr>, id <chr>, column <chr>, old_value <chr>,
#> # new_value <chr>, reason <chr>, n_rows <int>