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