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