Conditional Element Selection for ff vectors.
Similar as ifelse
in the base package but only works with yes and no as ff
vectors.
ffifelse(test, yes, no)
test |
logical or boolean |
yes |
an |
no |
an |
An ff vector of the same length as test
.
data(iris) ffiris <- as.ffdf(iris) ffifelse(ffiris$Sepal.Length < 5, TRUE, NA) ffifelse(ffiris$Sepal.Length < 5, factor(rep("abc", nrow(ffiris))), NA) ffifelse(ffiris$Sepal.Length < 5, Sys.Date(), factor("abc")) ffifelse( ffiris$Sepal.Length < 5, Sys.Date(), ff(seq.Date( Sys.Date()+1 , Sys.Date()+nrow(ffiris), by = "day")))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.