Description Usage Arguments Details Value See Also Examples
Element-wise Logarithms and Exponentials of in-database objects.
1 2 | ## S4 method for signature 'FLMatrix'
exp(x)
|
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 |
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.
returns an in-database object if there is atleast one in-database object as input.Otherwise, the default behavior of R is preserved
log
, exp
for Base R
implementation. sqrt
, sqrt
for sqrt base reference.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.