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