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