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