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