Skip to content

Some minor (but breaking) suggestions for categorize() #709

Description

@mattansb
  1. Current behavior is to return an integer vector. To be consistent with cut(), and to be safer to use, I think this function should return by default a factor - possible an ordered factor.
    • also I think we can drop the lowest argument?
  2. The breaks argument in R is usually used to provide the breaking values - here if those are done manually, they are sent to split instead.
  3. Rename split to method?
    1. We should add a right = TRUE argument, like with cut().

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions