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