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