Here is my code:
for(i in 1:(nrow(moon_sub))){
l_df[i,] <- getMoonTimes(date = moon_sub$Date[i], lat = -4.12006, lon = 36.11064, tz = "Africa/Nairobi", keep = c("rise", "set"), inUTC = F)
data <- left_join(l_df, moon_sub, by="Date")
print(data)
}
This returns the error: Error in if (d >= 0) { : missing value where TRUE/FALSE needed
Any help would be greatly appreciated!