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