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