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