neg_log {tidyrstats}R Documentation

Negative Logarithm (Base 10 by Default)

Description

Computes the negative logarithm of a numeric input using base 10 by default.

Usage

neg_log(x, base = 10)

neglog(x, base = 10)

Arguments

x

A numeric vector. Values must be positive.

base

A numeric value specifying the base of the logarithm. Default is 10.

Details

This function returns the negative logarithm of 'x'. By default, it uses base 10, but you can specify a different base using the 'base' argument. Designed for quickly transforming p values for statistical analysis.

Value

A numeric vector of negative logarithmic values.

Examples

pvals <- 10^runif(10, -15, -1)
neg_log(pvals)

[Package tidyrstats version 0.1.0 Index]