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