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