View source: R/Hypergeometric.R
Hypergeometric.test | R Documentation |
Calculates the significance of an overlap of two sets using an hypergeometric test. It is a wrapper of the 'phyper' function.
Hypergeometric.test( success, universe_success, universe_failure, size_collected, lower.tail = FALSE )
success |
Is the number of elements in the overlap of the sets. |
universe_success |
Is the number of elements of the set of interest. |
universe_failure |
Is the number of elements of the set of the other set. |
size_collected |
The total of elements in the universe |
lower.tail |
Should the test be calculated on the lower tail? (Hypothesis test is lower than) |
the p-value for the hypergeometric test.
require(magrittr) s = 10; S = 15; f = 10; T = 30 Hypergeometric.test(success = s, universe_success = S, universe_failure = f, size_collected = T )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.