percentize: Empirical Percentile Transformation

View source: R/percentize.R

percentizeR Documentation

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

## 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])

## End(Not run)

heatmaply documentation built on Oct. 7, 2023, 1:07 a.m.