| shift | R Documentation |
Normalised heteroplasmy shift
shift(H, H0, percent = TRUE, tol = 1e-04)
H |
numeric vector of heteroplasmy fractions, either in |
H0 |
numeric vector of baseline heteroplasmy fractions, either in
|
percent |
logical; are values in H represented as percentage points? |
tol |
tolerance with which to resolve homoplasmy |
A vector of normalised heteroplasmy shift calculated as
shift(H; H_0) = \frac{H(1-H_0)}{H_0(1-H)}.
Homoplasmic states are resolved as tol for homoplasmic wildtype, and
(1 - tol) for homoplasmic mutant.
# Using percentage points
H <- sample(0:100, 10)
H0 <- 50
shift(H, H0)
# Using fractions
h <- stats::runif(10)
h0 <- 0.3
shift(h, h0, percent = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.