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