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