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