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