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