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