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