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