An Empirical Percentile Transformation (percentize) is similar to taking the rank of a variable. The difference is that it is simpler to compare and interpret the transformed variables.

This is helpful for comparing several variables in a heatmap (e.g.: heatmaply).

percentize(x, ...)

Arguments

x

a vector or a data.frame.

...

Currently ignored.

Value

A vector (or data.frame) after ecdf was used on that vector. If x is a data.frame then only the numeric variables are transformed.

See also

Examples

if (FALSE) { x <- mtcars x <- data.frame(x) x$am <- factor(x$am) x$vs <- factor(x$vs) heatmaply(percentize(x)) x <- data.frame(a = 1:10, b = 11:20) x[4:6, 1:2] <- NA percentize(x) percentize(x[,1]) }