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