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