Checks that the fraction of non-NA values meets a threshold. Useful after joins to verify expected coverage.
Examples
df <- data.frame(id = 1:10, x = c(1:8, NA, NA))
lock_coverage(df, 0.8, x)
lock_coverage(df, 0.9, x) # warns (only 80% coverage)
pkgdown/mathjax-config.html
Skip to contentsChecks that the fraction of non-NA values meets a threshold. Useful after joins to verify expected coverage.
df <- data.frame(id = 1:10, x = c(1:8, NA, NA))
lock_coverage(df, 0.8, x)
lock_coverage(df, 0.9, x) # warns (only 80% coverage)