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