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