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