library(lubridate) library(ggplot2) library(StreamMetabolism) library(xts) library(reshape) library(scales) Aurich <- sunrise.set(53.4708393,7.4848308, "2024/01/01", timezone="MET", num.days=370) sunrise <- Aurich$sunrise sunset <- Aurich$sunset sunrise <- strftime(sunrise, format="%R", tz="MET") sunset <- strftime(sunset, format="%R", tz="MET") Aurich["sr"] <- as.POSIXct(sunrise, format = "%H:%M") Aurich["ss"] <- as.POSIXct(sunset, format = "%H:%M") Aurich["timestamp"] <- align.time(Aurich$sunrise, 60*10) Aurich <- Aurich[c("timestamp", "sr", "ss")] locsrss <- ggplot(Aurich, aes(x=Aurich$timestamp)) + geom_line(aes(y=Aurich$sr)) + geom_line(aes(y=Aurich$ss)) + labs(title = " Sonnenauf-/Sonnenuntergang - Aurich 2024", x = "Datum", y = "Zeit") pdf("Aurich_SA_SU.pdf", paper="a4r", width=11) locsrss dev.off() png(filename="Aurich_SA_SU.png", width = 1400, height = 800, units = "px") locsrss dev.off() Aurich["Sonnenaufgang"] <- strftime(Aurich$sr, format="%H:%M") Aurich["Sonnenuntergang"] <- strftime(Aurich$ss, format="%H:%M") write.table(Aurich, file="Aurich_SaSu.csv", dec=',', sep=';', row.names=FALSE)