Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

unsort

Hybrid Index, internal utilities


Description

Non-documented internal utilities that might change

Usage

unsort(x, ix)
unsort.hi(x, index)
unsort.ahi(x, index, ixre = any(sapply(index, function(i) {
    if (is.null(i$ix)) {
        if (i$re) TRUE else FALSE
    } else {
        TRUE
    }
})), ix = lapply(index, function(i) {
    if (is.null(i$ix)) {
        if (i$re)
            orig <- rev(seq_len(poslength(i)))
        else orig <- seq_len(poslength(i))
    }
    else {
        orig <- i$ix
    }
    orig
}))
subscript2integer(x, maxindex = NULL, names = NULL)

Arguments

x

x

ix

ix

ixre

ixre

index

index

maxindex

maxindex

names

names

Details

These are utility functions for restoring original order after sorting. For now we 'mimic' the intuitive but wrong argument order of match() which should rather have the 'table' argument as its first argument, then one could properly method-dispatch on the type of table. xx We might change to proper 'unsort' generic, but then we have to change argument order.

Value

undefined

Author(s)

Jens Oehlschlägel

See Also


ff

Memory-Efficient Storage of Large Data on Disk and Fast Access Functions

v4.0.4
GPL-2 | GPL-3 | file LICENSE
Authors
Daniel Adler [aut], Christian Gläser [aut], Oleg Nenadic [aut], Jens Oehlschlägel [aut, cre], Martijn Schuemie [aut], Walter Zucchini [aut]
Initial release
2020-10-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.