powered by
This function facilitates a comparison to check if the proportion or count of values in a logical vector is exactly equal to a specified value.
exactly_equal(logical_vec, p = NULL, n = NULL, na.rm = FALSE)
TRUE if the proportion or count of values is exactly equal to the specified value, otherwise FALSE.
TRUE
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(), less_than(), more_than()
at_least()
at_most()
less_than()
more_than()
# Check if all values are TRUE exactly_equal(c(TRUE, TRUE, TRUE), p = 1.0) # Returns TRUE
Run the code above in your browser using DataLab