Zeros happen. Logging zeros leads to errors in downstream code. For the sake of robustness, we replace zeros with a small positive number to be able to continue with calculations.

rlog(x, base = exp(1))

Arguments

x

numeric or complex vector.

base

positive or complex number. The base with respect to which logarithms are computed. Defaults to e=exp(1).

Details

Use judiciously, since errors are good too.