Skip to content

default q in quantcut #25

@ggrothendieck

Description

@ggrothendieck

It would be convenient if q defaulted to length(labels). (Example is from link).

library(gtools)

temp <- c(8.32, 8.43, 8.41, 7.86, 7.98, 7.86, 8.07, 8.51, 7.92, 7.94, 8.36)
labels = c("Low","Medium","High")

quantcut(temp, q = length(labels), labels = labels)

# if q had the above mentioned default we could write this witihout the redundant q.
quantcut(temp, labels = labels)

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