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