library(lubridate) library(ggplot2) library(StreamMetabolism) library(xts) library(reshape) library(scales) ___burgebrach <- sunrise.set(49.8264562,10.7415935, "2021/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 2021", 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)