Log: Natural Logarithm each element of a matrix

View source: R/Log.R

Natural Logarithm each element of a matrixR Documentation

Natural Logarithm each element of a matrix

Description

Natural Logarithm each element of a matrix.

Usage

Log(x, na.rm = FALSE)

Arguments

x

A matrix with data.

na.rm

A boolean value (TRUE/FALSE) for removing NA.

Details

The argument must be a matrix. For vector the time was the same as R's "log" function so we did not add it.

Value

A matrix where each element is the natural logarithm of the given argument.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

Lbeta, Lchoose, Choose

Examples

x <-matrix( runif( 100 * 100), ncol = 100 )
a <- log(x) 
b <- Log(x) 
all.equal(a, b) # true

x<-a<-b<-NULL

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.