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