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