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