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