R/heatmap-utils.R
prev.Rd
Useful as helper for taxon prevalence calculation
prev(x, undetected = 0)
numeric vector (of taxon counts or proportions)
value above which a taxon is considered present or detected
numeric value
prev(c(0, 0, 1, 2, 4)) #> [1] 0.6 prev(c(0, 0, 1, 2, 4), undetected = 1.5) #> [1] 0.4