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