These C-coded utilitites speed up index preprocessing considerably.
1 2 3 4 5
an integer vector
one of "none","break","skip", see details. The strange defaults stem from the initial usage.
intrle is by factor 50 faster and needs less RAM (2x its input
vector) compared to
rle which needs 9x the RAM of its input
vector. This is achieved because we allow the C-code of
break when it turns out, that rle-packing will not achieve a compression
factor of 3 or better.
intisasc is a faster version of
is.unsorted: it checks whether
x is sorted.
intisdesc checks for being sorted descending and
by default default assumes that the input
x contains no NAs.
NAs (the smallest integer) like every other integer and hence returns either
na.method="break" checks for
NAs and returns either
NA as soon as
NA is encountered.
na.method="skip" checks for
NAs and skips over them, hence decides the return value only on the basis of non-NA values.
intrle returns an object of class
rle or NULL,
if rle-compression is not efficient (compression factor <3 or length(x)<3).
intisasc returns one of
FALSE, NA, TRUE
intisdesc returns one of
FALSE, TRUE (if the input contains
NAs, the output is undefined)
intisasc: check whether integer vector is ascending
intisdesc: check whether integer vector is descending
1 2 3 4 5 6 7 8 9 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.