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