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