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