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