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