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