Skip to content

unique() for Interval? #315

Closed
Closed
@mmuurr

Description

@mmuurr

unique() doesn't appear to be defined for class Interval, yet it silently runs and produces results that (I think) don't make sense.

example:

foo <- Sys.time() + days(1:4)
ints <- rep(interval(head(foo, -1), tail(foo, -1)), 2)
## each interval is the same _duration_, and unique(ints) simply returns the unique durations (in seconds).
## would (reasonably) expect the 3 unique _intervals_, instead.
unique(ints)
## [1] 86400

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