Skip to content

get_n() not working for Date objects #51

@thibautjombart

Description

@thibautjombart

Hi there,

trying to test if a time interval is 'days' using get_n(), I get the following:

library(incidence2)
library(grates)
  
i <- rpois(100, lambda = exp(0.0523 * 1:100))
onset <- rep(Sys.Date() + 1:100, i)
incid <- incidence2::incidence(data.frame(onset), "onset")
dates <- get_dates(incid)
get_n(dates)
# Error in get_n.default() : Not implemented for class [Date].

It may be the desired behaviour, but if so it would be quite handy to restore a get_interval in incidence2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions