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