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