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