Closed Yunuuuu closed 2 years ago
are you sure it isn't just a copy paste error? it seems like you have an extra x
in add_days()`
library(clock)
library(magrittr)
year_month_day(2019, 2, 28:31) %>%
invalid_resolve(invalid = "next") %>%
as_naive_time() %>%
add_days(x, 1L) # <- right here you dont need `x`
#> Error in is_duration(x): object 'x' not found
year_month_day(2019, 2, 28:31) %>%
invalid_resolve(invalid = "next") %>%
as_naive_time() %>%
add_days(1L)
#> <time_point<naive><day>[4]>
#> [1] "2019-03-01" "2019-03-02" "2019-03-02" "2019-03-02"
Created on 2022-02-08 by the reprex package (v2.0.1)
Oh! sorry for the stupid mistakes. I have checked this for a long time but didn't find this typos!!! Thanks for your help @DavisVaughan!
Hi, thanks for your all efforts in developing this R package for working with date-times, I'm learning this package but went to wrong when run example code in clock FAQ using following code:
which generated such error information:
rlang::last_error()
produced followinghere is my sessionInfo output: