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