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