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