Skip to content

Difference of frank vs base::rank -- names removed #4240

Description

@MichaelChirico

Using the example from ?base::rank

x2 <- c(3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5)
names(x2) <- letters[1:11]
invisible(rank(x2))
names(x2)
#  [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k"
invisible(frank(x2))
names(x2)
# NULL

Activity

  1. jangorecki commented on Apr 2, 2020

    @jangorecki
    Member

    This should be automatically resolved when we will fix #2683
    Names are being lost exactly after this line

    setDT(x)

    Just for solving frank for the present moment we could check if atomic input has names, and then copy it before wrapping into list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions