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