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