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