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