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