I have done some genome scan analysis and I want to identify the outlier loci. For an expected value of the FRD equal to q = 10, a list of candidate loci can be obtained by using the Benjamin-Hochberg procedure as follows:
q=0.1 L = length(adjusted.p.values) W = which(sort(adjusted.p.values) < q * (1:L) / L) candidates = order (adjusted.p.values)[w]
and this is part of the outliers and my output
head(candidates)  3 4 9 10 13
But I need the output in a different type. I want to assign TRUE if a locus has been chosen as outlier and FALSE if it has not
head (desired_output)  FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE
Any idea how can I modify the Code?