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