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