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