Validate according to the proportion of NAs in a column #363
-
Hi Richard, Thanks for the great package. I'm wondering if there is a function that allows to calculate the proportion of NAs available within a column. For example, if one column has more than 20% of its values as NAs, the validation should fail. Thanks again. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@feddelegrand7 for this type of validation you could use the To set the failure level to 20%, use Hope this helps! |
Beta Was this translation helpful? Give feedback.
@feddelegrand7 for this type of validation you could use the
col_vals_not_null()
function (see https://rich-iannone.github.io/pointblank/reference/col_vals_not_null.html for help and examples). This checks forNA
s in data frames andNULL
s in database tables.To set the failure level to 20%, use
action_levels(stop_at = 0.2)
for theactions
argument increate_agent()
. More help on this is available at https://rich-iannone.github.io/pointblank/reference/action_levels.html.Hope this helps!