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