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