library(lubridate) library(ggplot2) library(StreamMetabolism) library(xts) library(reshape) library(scales) Dorsten <- sunrise.set(51.659089,6.966174, "2025/01/01", timezone="MET", num.days=370) sunrise <- Dorsten$sunrise sunset <- Dorsten$sunset sunrise <- strftime(sunrise, format="%R", tz="MET") sunset <- strftime(sunset, format="%R", tz="MET") Dorsten["sr"] <- as.POSIXct(sunrise, format = "%H:%M") Dorsten["ss"] <- as.POSIXct(sunset, format = "%H:%M") Dorsten["timestamp"] <- align.time(Dorsten$sunrise, 60*10) Dorsten <- Dorsten[c("timestamp", "sr", "ss")] locsrss <- ggplot(Dorsten, aes(x=Dorsten$timestamp)) + geom_line(aes(y=Dorsten$sr)) + geom_line(aes(y=Dorsten$ss)) + labs(title = " Sunrise/Sunset - Dorsten 2025", x = "Date", y = "Time") pdf("Dorsten_SA_SU.pdf", paper="a4r", width=11) locsrss dev.off() png(filename="Dorsten_SA_SU.png", width = 1400, height = 800, units = "px") locsrss dev.off() Dorsten["Sunrise"] <- strftime(Dorsten$sr, format="%H:%M") Dorsten["Sunset"] <- strftime(Dorsten$ss, format="%H:%M") write.table(Dorsten, file="Dorsten_SaSu.csv", dec=',', sep=';', row.names=FALSE)