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