is_logscale: Detect Log-transformed Data

Description Usage Arguments Details Functions Source Examples

View source: R/utils.R

Description

is_logscale tells if some numeric data is in log scale, e.g., normalized microarray data, using the same heuristic as GEO2R.

Usage

1
2
3
4
5
is_logscale(x, robust = TRUE, extremes = c(0.02, 0.98))

has_logscale_outliers(x, ...)

log_transform(x, base = 2)

Arguments

x

a numeric data object (matrix, vector, ExpressionSet)

robust

logical that indicates if the decision should be done robustly by removing the more extreme values.

extremes

a length-2 numeric vector that gives the lower and upper quantiles used to remove extreme values. Only relevant when robust = TRUE.

...

other arguments passed to is_logscale, like argument extremes to control the extreme values that are removed.

base

log base to use.

Details

The data needs to be of reasonable size and variance for the detection heuristic to work correctly.

Functions

Source

www.ncbi.org/geo

Examples

1
2
3
x <- matrix(rnorm(20*10, mean=500), 20, 10)
is_logscale(x)
is_logscale(log_transform(x))

renozao/xbioc documentation built on Sept. 3, 2020, 1:13 a.m.