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