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