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