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