Applies the `Math`

group functions to `spam`

objects

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
# ceiling(x)
# floor(x)
# exp(x, base = exp(1))
# log(x, base = exp(1))
# sqrt(x)
# abs(x)
# cumprod(x)
# cumsum(x)
# cos(x)
# sin(x)
# tan(x)
# acosh(x)
...
``` |

`x` |
spam object. |

`base` |
positive number. The base with respect to which logarithms
are computed. Defaults to |

It is important to note that the zero entries do not enter the
evaluation when `structurebased=FALSE`

. The operations are performed on the stored non-zero
elements. This may lead to differences if compared with the same
operation on a full matrix.

If `structurebased=TRUE`

, all functions operate on the vector `x@entries`

and return the
result thereof.

Conversely, if `structurebased=FALSE`

, the result is identical to
one with `as.matrix(x)`

input and an `as.spam`

purger.

Reinhard Furrer

`Summary.spam`

, `Ops.spam`

and `Math2.spam`

1 2 3 4 5 6 7 8 9 10 11 | ```
getGroupMembers("Math")
mat <- matrix(c( 1,2,0,3,0,0,0,4,5),3)
smat <- as.spam( mat)
cos( mat)
cos( smat)
spam.options(structurebased=FALSE)
cos( smat)
sqrt( smat)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.