Description Usage Arguments Value Examples
This function fits the data exactly to the normal distribution (or any other quantile function given as FUN
) using corresponding quantiles.
1 | rank.normalize(x, FUN = qnorm, ties.method = "average", na.action)
|
x |
the data to normalize |
FUN |
a quantile function such as |
ties.method |
the |
na.action |
a function to handle |
the normalized data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | not.normal <- rlnorm(100)
hist(not.normal)
hist(rank.normalize(not.normal))
# Different function
hist(rank.normalize(not.normal, FUN = qexp))
# Breaking ties
hist(rank.normalize(not.normal, ties.method = "random"))
# Missing values
not.normal[10] <- NA
hist(rank.normalize(not.normal)) # Shouldn't fail
## Not run: hist(rank.normalize(not.normal, na.action = na.fail)) # Should fail
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.