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