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