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