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