Symbolic element-wise natural logarithm operation for LazyTensor
objects or default element-wise natural logarithm operation otherwise,
i.e. \(\log(x)\).
Usage
log(x, base = exp(1))Arguments
- x
input for
log.default()orlog.LazyTensor().- base
numeric, see
log.default(), not used withLazyTensorinput.
Value
See value of log.default() or
log.LazyTensor().
Details
If x is a LazyTensor, see log.LazyTensor(), else
see log.default().
Examples
if (FALSE) {
# R base operation
log(1)
log(1:10)
# LazyTensor symbolic element-wise natural logarithm
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
x_i <- LazyTensor(x, index = 'i') # creating LazyTensor from matrix x,
# indexed by 'i'
Log_x <- log(x_i) # symbolic matrix, 150 rows and 3 columns
}