So I have my dataset titled WSW and I have done the sunrise and sunset functions to get the sunrise and sunset times from a series of dates which has created a second dataset titled df (see below code)
df <-
getSunlightTimes(
date = seq.Date(as.Date("1986-01-01"), as.Date("2020-12-31"), by = 1),
keep = c("sunrise", "sunriseEnd", "sunset", "sunsetStart"),
lat = 51.4545,
lon = 2.5879,
tz = "UTC"
)
The second dataset however is HUGE as it has all the sunrise and sunset times from 1986 to 2020! There are only 41 dates with sunrise and sunset times that I need between 1986 and 2020 so I was wondering how do I extract that data without typing all 41 dates manually?
I hope this has made sense?! Thanks!!