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