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