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