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