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