Skip to contents

Select elements based on the false discovery rate. The provided significance (x) is corrected via the Benjamini-Hochberg procedure.

Usage

selectByFdr(x, alpha = 0.05, operator = c("<", "<="))

Arguments

x

numerical vector indicating the p-values.

alpha

numerical value, the upper-bound on the FDR.

operator

character string indicating the relational operator to use.

Value

A logical vector, indicating the elements to keep.

Author

Alessandro Barberis

Examples

#Seed
set.seed(1010)

#Data
x = seq(from = 0, to = 1, by = 0.1)
names(x) = paste0("f", seq(11))

#Select
selectByFdr(x = x, alpha = 0.3)
#>    f1    f2    f3    f4    f5    f6    f7    f8    f9   f10   f11 
#>  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE