safelog: safelog

View source: R/Functions_plotting_genericData.R

safelogR Documentation

safelog

Description

apply a log function to a numeric vector, but replaces zeros and uses abs values

Usage

safelog(x, base = 10, replaceZeros = NULL, replaceNonFinites = NA_real_)

Arguments

x

numeric vector of positive values

base

of log

replaceZeros

replace zeros with this value, if NULL will use smallest non-zero absolute value in x

replaceNonFinites

replace non-finite values (Inf, -Inf, NA) with this value before applying log

Value

a numeric vector of same length as x, with logarithmized values


mjhelf/METABOseek documentation built on April 27, 2022, 5:13 p.m.