Skip to content

orderfin() inconsistent on valid 'x' types #167

Description

@MichaelChirico
orderfin(as.integer64(10:1), 1:10, 0:1, method=1)
# [1] FALSE FALSE

orderfin(as.integer64(10:1), 1:10, 0:1, method=2)
# Error in UseMethod("ramorder") : 
#   no applicable method for 'ramorder' applied to an object of class "c('integer', 'numeric')"

That's coming from ramorder(0:1), where ramorder() has no integer method. A simple fix is to cast as.integer64(x) first, otherwise to attempt a ramorder.integer method which does so (to avoid the case of casting a double & it's concomitant issues).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions