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