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