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