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