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