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