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