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