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