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