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