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