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