Skip to contents

Applies a logarithmic transformation to each element of a numeric vector. Elements greater than 1 are transformed using log10, while elements less than or equal to 1 are set to 0.

Usage

logSingleData(x)

Arguments

x

A numeric vector to be transformed.

Value

A numeric vector with the transformed values.

Examples

logSingleData(c(10, 1, 0.5, 20))
#> [1] 1.00000 0.00000 0.00000 1.30103