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