Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upunique() for Interval? #315
Comments
|
quick add on why this could be useful: stratification by interval, e.g. by creating interval factors: ## continuing the example code from above...
factor(ints)
## [1] <NA> <NA> <NA> <NA> <NA> <NA>
## Levels: 86400
foo <- data.frame(x = 1:6, ints = ints)
## if dlply-ing over ints, would expect a length-3 vector of 2s... instead it's a length-1 vector of 6:
unlist(dlply(foo, .(ints), nrow)) |
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: