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