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