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