-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
- names of
testcould be retained
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 - recycling here needs to be fixed, AFAIU might result into segfault - PR propose to remove this feature
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- coerce int to double when desired (but not double to int, as in base::ifelse)
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- remove hutils, dplyr code from examples, pass
--run-dontrun - remove console output in examples
- int64 support NAs