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