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