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