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