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