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