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