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