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