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