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