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