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