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