This might be an easy question, but I can’t figure out a way to solve it:
I have tracking-data of an animal (coordinates, date and time) and I want to select the data between sunset and sunrise. As the data are from different areas and months, the time of sunrise and sunset varies.
With getSunlightTimes (suncalc-package) I added the time of sunrise and sunset of the specific place and date as columns.
Now I have to select the data points where the time lies between sunset and sunrise.
How can I do this?
A random example of the data:
Example of my data
I tried it with normal subsets and other ways of filtering data and with the columns as POSIXct, but it didn’t work out (for me).
Thank you very much for your help!
Verena Rupprecht is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.