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