R/5-selection-functions.R
selectByCutoff.Rd
Select elements based on a cutoff on their values.
selectByCutoff(x, cutoff, operator = c("<", "<=", ">", ">="))
numerical vector.
numeric value indicating the cutoff.
character string indicating the relational operator to use.
A logical vector, indicating the elements to keep.
Alessandro Barberis
#Seed set.seed(1010) #Data x = seq(10) names(x) = paste0("f", seq(10)) #Select selectByCutoff(x = x, cutoff = 5, operator = "<") #> f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 #> TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE