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