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