Skip to content

Method not defined for "Interval %within% list" #1001

@mcanouil

Description

@mcanouil

Hi,

it seems that using an interval as LHS and a list of intervals as RHS is not implemented.
The current documentation implies it is supposed to work:

  • a An interval or date-time object.
  • b Either an interval vector, or a list of intervals.
library(lubridate)
#> 
#> Attachement du package : 'lubridate'
#> Les objets suivants sont masqués depuis 'package:base':
#> 
#>     date, intersect, setdiff, union
int <- interval(ymd("2001-01-01"), ymd("2002-01-01"))
int2 <- interval(ymd("2001-06-01"), ymd("2002-01-01"))
int2 %within% list(int)
#> Error in int2 %within% list(int): No %within% method with signature a = Interval,  b = list

Created on 2021-10-06 by the reprex package (v2.0.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions