This function takes a numeric vector with binary values (0 and 1) and converts it into a character vector with 'No' for 0 and 'Yes' for 1. Any value other than 0 or 1 is converted to NA.

binary_to_text(x)

Arguments

x

A numeric vector containing binary values (0 or 1).

Value

A character vector where 0 is replaced with 'No', 1 is replaced with 'Yes', and all other values are replaced with NA.