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