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