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