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