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