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