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