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