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