Skip to contents

For 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()).

Usage

corrections_log(x)

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>