log | R Documentation |
log
computes logarithms, by default natural logarithms, log10
computes common (i.e., base 10) logarithms, and log2
computes binary
(i.e., base 2) logarithms. The general form log(x, base) computes logarithms
with base
.
## S4 method for signature 'fm' log10(x) ## S4 method for signature 'fmV' log10(x) ## S4 method for signature 'fm' log2(x) ## S4 method for signature 'fmV' log2(x) ## S4 method for signature 'fm' exp(x) ## S4 method for signature 'fmV' exp(x) ## S4 method for signature 'fm' log(x, base = exp(1)) ## S4 method for signature 'fmV' log(x, base = exp(1))
x |
a numeric vector. |
base |
a positive number. |
exp
computes the exponential function.
A vector of the same length as x
containing the transformed
values. log(0)
gives -Inf
, and log(x)
for negative
values of x
is NaN
. exp(-Inf)
is 0.
mat <- log(fm.runif.matrix(100, 10)) mat <- log10(fm.runif.matrix(100, 10)) mat <- log2(fm.runif.matrix(100, 10)) mat <- exp(fm.runif.matrix(100, 10))