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