Description Usage Arguments Details Value Examples
Unary and binary Arithmetic and Logic operators (with
exceptions given below) are implemented between two rle
objects
and between an rle
object and a scalar.
1 2 | ## S3 method for class 'rle'
Ops(e1, e2)
|
e1, e2 |
Arguments to unary ( |
Supported operations include all elements of the Ops
group, as well as xor
. Within the Arithmetic and Logic
operators, this includes (taken from the R help): +
, -
, *
,
/
, ^
, <
, >
, <=
, >=
, !=
, ==
, %%
, %/%
, &
,
|
, !
, and xor
; but excludes non-vector logical functions
and operators such as isTRUE
and &&
.
In every supported case, the operation should result in an
rle
that would have resulted had the operation been applied
to the original (uncompressed) vectors, then compressed using
rle
, with the proviso that if the resulting function creates
adjacent runs of the same value, they are not merged. This must
be done explicitly with compress.rle
. (At no point in the
calculation are the uncompressed vectors actually constructed, of
course.)
An operation between an rle
and a zero-length object produces
an empty rle
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.