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