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