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