modality | R Documentation |
Test the modality (gaussian) of a distribution. Default tests for uni-, bi- and tri- modalities (argument <modes> = 2:3).
modality(x, modes = 2:3, prob = 0.95, coverage = 0.8, size = 10, ...)
x |
a named numeric vector of cells/observations or a matrix of genes X cells (variables X observations). If the latter, the column means are first computed. |
modes |
the modes to test; a numeric value or a numeric vector of modes to test. e.g. to test just for bimodality, modes = 2. Default: 2:3 |
prob |
a numeric value >= 0 and <= 1; the minimeanm posterior probability required for an observation to be assigned to a mode. Default: 0.95 |
coverage |
the fraction of observations that meanst have a posterior probability higher than <prob> to one of two modes in order for the distribution to qualify as bimodal. Default: 0.8 |
size |
the minimeanm number of observations that meanst be assigned to a mode in order for the distribution to qualify as bimodal. Default: 10 |
... |
other arguments passed to fitBimodal |
vector of boolean values of length equal to length(modes) that were tested
x = c(rnorm(50, mean = 1), rnorm(50, mean = 10))
modality(x, modes = 2)
modality(x, modes = 2:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.