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