If the vector is a 0/1 vector, it is converted to a logical one
TRUE/FALSE vector. This transformation is performed only if
the vector contains only values 0, 1, or NA. If this is not the case
returns the original variable.
This transformation can be done on numeric, string, and factor vectors.
Usage
transform_01_to_ft(x)
Value
The transformed vector if a transformation is possible.
If no transformation is possible, the original vector
returned.
Arguments
x
the vector to be tested and transformed.
See Also
Other vector calculations:
academic_year(),
clean_multiple_underscores(),
interval_round(),
month_name(),
sum_0_1()