I've got GPS data from different herbivore species. This gives me multiple datapoints per day with date, time, longitude, latitude, etc. I am trying to sort this data into day and night, using the sunrise and sunset times. I tried doing this with sunrise.set from the package StreamMetabolism. The problem I get however, is that it assumes that every row belongs to a new date. Does anyone know how I can link the date in this function to the date column in my dataset?
This is what I've tried. num.days is set to 27956, as that's the number of rows in my dataset.
newgpsdata$sunRise <- sunrise.set(51.700998, 5.626467, "2016/03/08", timezone = "Europe/Amsterdam", num.days = 27956)
newgpsdata$sunRise <- sunrise.set(51.700998, 5.626467, newgpsdata$Date, timezone = "Europe/Amsterdam")
This returns the error "Error in seq.POSIXt(from = day, length.out = num.days, by = "days") :
'from' must be of length 1"