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