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