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