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