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