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