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