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