powered by
This function facilitates a comparison to check if less than a specified proportion or count of values in a logical vector evaluate to TRUE.
TRUE
less_than(logical_vec, p = NULL, n = NULL, na.rm = FALSE)
TRUE if the condition is met for less than the specified proportion or count, otherwise FALSE.
FALSE
A logical vector.
Proportion value (0 to 1) to compare against.
Count value (integer) to compare against.
Logical. Should missing values be removed before calculation?
Other basic_quantifiers: at_least(), at_most(), exactly_equal(), more_than()
at_least()
at_most()
exactly_equal()
more_than()
# Check if less than 10% of values are TRUE less_than(c(TRUE, FALSE, FALSE), p = 0.1) # Returns FALSE
Run the code above in your browser using DataLab