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