sort-HistDat-method: This is a dummy method so that sort can be applied to HistDat...

Description Usage Arguments Details Value Examples

Description

This is a dummy method so that sort can be applied to HistDat entries However it does nothing, because the values in a HistDat are sorted at the time of creation.

Usage

1
2
## S4 method for signature 'HistDat'
sort(x, decreasing = F, ...)

Arguments

x

HistDat A HistDat instance

decreasing

If TRUE, this function will fail, as the observations are sorted in ascending order by default and this cannot be changed

...

Additional arguments allowed for compatibility that will be ignored

Details

An S3 and and S4 generic is defined for this method, allowing compatibility with existing code that calls base::sort() instead of [sort()], which is defined as an S4 generic in this package

Value

The same HistDat instance, completely unchanged

Examples

1
2
hd <- HistDat(vals = 1:3, counts = c(1, 2, 1))
sort(hd) # returns `hd` verbatim

HistDat documentation built on April 6, 2021, 9:08 a.m.