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