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