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