powered by
Turn binary vector into a factor
factorize_binary_vector(data_vector, custom_labels = NULL)
A factor with two levels in TRUE, FALSE order.
TRUE
FALSE
Logical vector.
Optional length-2 character vector: first for TRUE, second for FALSE.
factorize_binary_vector(c(TRUE, FALSE, TRUE))
Run the code above in your browser using DataLab