fifelse(c(a=T,b=F), 1:2, 2:1)
#[1] 1 1
ifelse(c(a=T,b=F), 1:2, 2:1)
#a b
#1 1
fifelse(c(TRUE, FALSE), 1:2, list(0L))
#[1] 1 544979712
ifelse(c(TRUE, FALSE), 1:2, list(0L))
#[[1]]
#[1] 1
#
#[[2]]
#[1] 0
str(ifelse(c(T,F),c(1,2),11:12))
# num [1:2] 1 12
str(ifelse(c(T,F),1:2,c(11,12)))
# num [1:2] 1 12
str(ifelse(c(T,F),1:2,c(11,12)))
#Error in fifelse
testcould be retained--run-dontrun