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