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