Learn R Programming

Mergeomics (version 1.0.0)

tool.unify: Convert a distribution to uniform ranks

Description

tool.unify converts a distribution to uniform ranks with respect to a background distribution (or self if no background available).

Usage

tool.unify(xtrait, xnull = NULL)

Arguments

xtrait
the distribution that will be standardized, i.e. uniformly distributed
xnull
background distribution to be used to distribute xtrait uniformly. If xnull is not specified, xtrait will be used as background distr

Value

y
uniformly distributed form of xtrait

Examples

Run this code
x <- rnorm(10)
y <- tool.unify(x) ## uniformly distributed form of x when null dist is x
z <- tool.unify(x, y) ## uniformly distributed form of x when null dist is y

Run the code above in your browser using DataLab