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