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