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