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