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