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