10000 `epi_slide(.window_size = Inf)` raises error on integer-class `time_value`s · Issue #659 · cmu-delphi/epiprocess · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
epi_slide(.window_size = Inf) raises error on integer-class time_values #659
Open
@brookslogan

Description

@brookslogan
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
library(epiprocess)
#> Loading required package: epidatasets
#> Registered S3 method overwritten by 'tsibble':
#>   method               from 
#>   as_tibble.grouped_df dplyr
#> 
#> Attaching package: 'epiprocess'
#> The following object is masked from 'package:stats':
#> 
#>     filter
vctrs::vec_rbind(
  tibble::tibble(geo_value = 1, time_value = 1:4, value = 1:4),
  tibble::tibble(geo_value = 2, time_value = 4:7, value = 11:14)
) %>%
as_epi_df() %>%
epi_slide(~ sum(.x$value), .window_size = Inf)
#> Error in `slider::hop_index()`:
#> ! Can't convert from `.starts` <double> to `.i` <integer> due to loss of precision.
#> • Locations: 1, 2, 3, 4

Created on 2025-04-08 with reprex v2.1.1

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

      0