exp-FLMatrix-method: Logarithms and Exponentials of in-database objects.

Description Usage Arguments Details Value See Also Examples

Description

Element-wise Logarithms and Exponentials of in-database objects.

Usage

1
2
## S4 method for signature 'FLMatrix'
exp(x)

Arguments

x

can be an in-database object like FLMatrix,FLVector or a normal R object

base

a positive number with respect to which logs are computed

Details

All types of operands are possible just like in R and the result is an in-database object. exp computes the exponential function. log computes the logarithm to base as specified(default e). logb computes the logarithm to base as specified(default e). log1p computes the log10(1+x) accurately (also for |x| << 1). log10 computes the logarithm to base 10. log2 computes the logarithm to base 2. expm1 computes exp(x)-1 accurately (also for |x| << 1). sqrt computes the (principal) square root of x, √x. The naming follows the standard for computer languages such as C or Fortran.

Value

returns an in-database object if there is atleast one in-database object as input.Otherwise, the default behavior of R is preserved

See Also

log , exp for Base R implementation. sqrt, sqrt for sqrt base reference.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
flmatrix <- FLMatrix("tblMatrixMulti", 1,"MATRIX_ID","ROW_ID","COL_ID","CELL_VAL")
ResultFLmatrix <- exp(flmatrix)
ResultFLmatrix <- logb(flmatrix,3)
ResultFLmatrix <- log10(flmatrix)
ResultFLmatrix <- log1p(flmatrix)
ResultFLmatrix <- log(flmatrix)
ResultFLmatrix <- log2(flmatrix)
deeptable <- FLTable("tblUSArrests","ObsID","VarID","Num_Val")
flvector <- deeptable[1:5,1]
resultFLVector <- exp(flvector)
resultFLVector <- log(flvector,4)

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.