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