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