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