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