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