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