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