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