Learn R Programming

heatmaply (version 1.1.1)

percentize: Empirical Percentile Transformation

Description

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).

Usage

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

normalize

Examples

Run this code
# NOT RUN {
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])

# }

Run the code above in your browser using DataLab