You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
), one other function from clock that I think would be very useful to translate would be date_count_between, so code like below would work if the data were in a database.
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(clock)
test_data<-data.frame(
person=1L,
date_1= as.Date("1980-01-01"),
date_2= as.Date("2010-01-01")
)
test_data|>
mutate(days= date_count_between(date_1, date_2, "day"))
#> person date_1 date_2 days#> 1 1 1980-01-01 2010-01-01 10958
To go with existing clock translations (like these
dbplyr/R/backend-postgres.R
Line 240 in 8f2fcb0
Created on 2024-05-04 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: