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