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