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