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