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