Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar without events returns an error #20

Open
brianmsm opened this issue Mar 4, 2021 · 0 comments
Open

Calendar without events returns an error #20

brianmsm opened this issue Mar 4, 2021 · 0 comments

Comments

@brianmsm
Copy link

brianmsm commented Mar 4, 2021

Hello
I am using the package a lot, it is really super useful and I love it. However, I am having a problem (error) when I request events from a calendar on a date, and there are no events on it. I would like to find a way to return a data.frame with 0 rows (empty) or a function to check if there are events or not on a certain date (validation).

library(tidyverse)
library(gcalendr)

interes <- calendar_list() %>% 
  filter(str_detect(summary, "Vac")) 

calendar_events(interes$id[7],
                days_in_past = 0,
                days_in_future = 1,
                now = lubridate::ymd("2021-03-08"))
#> Reading calendar [email protected]
#> Error: Can't subset columns that don't exist.
#> x Column `summary` doesn't exist.

Created on 2021-03-04 by the reprex package (v1.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant