Description Usage Arguments Group Generics Author(s) See Also

Common operations on DSArray objects

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ```
## S4 method for signature 'DSArray'
Math(x)
## S4 method for signature 'DSArray'
cummax(x)
## S4 method for signature 'DSArray'
cummin(x)
## S4 method for signature 'DSArray'
cumprod(x)
## S4 method for signature 'DSArray'
cumsum(x)
## S4 method for signature 'DSArray'
Math2(x)
## S4 method for signature 'DSArray,vector'
Ops(e1, e2)
## S4 method for signature 'vector,DSArray'
Ops(e1, e2)
## S4 method for signature 'DSArray,DSArray'
Ops(e1, e2)
``` |

`x, e1, e2` |
DSArray objects. |

DSArray objects have partial and limited support for the S4 group generics. The following methods are optimally implemented:

`Arith`

`"+"`

,`"-"`

,`"*"`

,`"^"`

,`"%%"`

,`"%/%"`

,`"/"`

provided that one argument is a vector of length 1.`Compare`

`"=="`

,`">"`

,`"<"`

,`"!="`

,`"<="`

,`">="`

provided that one argument is a vector of length 1.`Logic`

`"&"`

,`"|"`

provided that one argument is a vector of length 1.`Ops`

`"Arith"`

,`"Compare"`

,`"Logic"`

provided that one argument is a vector of length 1.`Math`

`"abs"`

,`"sign"`

,`"sqrt"`

,`"ceiling"`

,`"floor"`

,`"trunc"`

,`"log"`

,`"log10"`

,`"log2"`

,`"log1p"`

,`"acos"`

,`"acosh"`

,`"asin"`

,`"asinh"`

,`"atan"`

,`"atanh"`

,`"exp"`

,`"expm1"`

,`"cos"`

,`"cosh"`

,`"sin"`

,`"sinh"`

,`"tan"`

,`"tanh"`

,`"gamma"`

,`"lgamma"`

,`"digamma"`

,`"trigamma"`

`Math2`

`"round"`

,`"signif"`

`Summary`

`"max"`

,`"min"`

,`"range"`

,`"prod"`

,`"sum"`

,`"any"`

,`"all"`

The following methods are sub-optimally implemented, i.e. these methods
first *densify* the data and then call the relevant
`base::array`

-based method (a warning is given when the
data are densified).

`Arith`

`"+"`

,`"-"`

,`"*"`

,`"^"`

,`"%%"`

,`"%/%"`

,`"/"`

if one argument is a vector of length greater than 1 or both objects are DSArray instances.`Compare`

`"=="`

,`">"`

,`"<"`

,`"!="`

,`"<="`

,`">="`

if one argument is a vector of length greater than 1 or both objects are DSArray instances.`Logic`

`"&"`

,`"|"`

if one argument is a vector of length greater than 1 or both objects are DSArray instances.`Ops`

`"Arith"`

,`"Compare"`

,`"Logic"`

if one argument is a vector of length greater than 1 or both objects are DSArray instances.`Math`

`"cummax"`

,`"cummin"`

,`"cumprod"`

,`"cumsum"`

.

Use of these sub-optimal methods rather obviously defeats the purpose of using DSArray objects; contributions adding optimised methods are most welcome (I will add those that are useful in my own work).

The `Complex`

S4 group generic is not implemented in any form because
the DSArray class does not currently support complex data.

Peter Hickey

PeteHaitch/DRMatrix documentation built on May 9, 2017, 5:43 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.