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