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