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