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