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