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