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