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