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