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