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