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