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