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