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