Skip to contents

Convert Vector of Logical to Vector of "Ja"/"Nein"

Usage

logicalToYesNo(x, yesno = c("Ja", "Nein"))

Arguments

x

vector of logical

yesno

vector of character of length two giving the strings to be used for TRUE and FALSE, respectively

Value

vector of character

Examples

logicalToYesNo(c(TRUE, FALSE, TRUE))
#> [1] "Ja"   "Nein" "Ja"  
logicalToYesNo(c(TRUE, FALSE, TRUE), yesno = c("Yeah!", "Oh no!"))
#> [1] "Yeah!"  "Oh no!" "Yeah!"