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