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