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