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