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