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