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