helper_checkrow function

Check a vector for particular values

Check a vector for particular values

helper_checkrow( row, check_type = c("all_equal", "all_not_equal", "any_in"), check_value, na_rm = TRUE )

Arguments

  • row: a vector of data
  • check_type: a string indicating the type of check to do on row. Options are "all_equal", "all_not_equal", and "any_in". A value of "all_equal" will check that all values in row equal check_value. A value of "all_not_equal" will check that all values of row are not equal to check_value. A value of "any_in" will check if any of the values in check_value are in row.
  • check_value: a vector of values to check against
  • na_rm: logical indicating whether or not to perform check after removing NAs, passed to argument na.rm of any() or all(). Default is TRUE.

Returns

a logical vector with the result of the check

Details

If all values of row are NA, then an NA is returned.

See Also

Other helper functions: helper_palette(), helper_varslist()