Commit 22e9829c authored by Jana Ulrich's avatar Jana Ulrich
Browse files

change in IDF.agg add year to output

parent d0324c25
...@@ -82,7 +82,8 @@ IDF.agg <- function(data,ds,na.accept = 0, ...@@ -82,7 +82,8 @@ IDF.agg <- function(data,ds,na.accept = 0,
data.agg <- pbsapply(ds,agg.ts,simplify=TRUE,cl=cl) data.agg <- pbsapply(ds,agg.ts,simplify=TRUE,cl=cl)
df <- data.frame(xdat = as.vector(data.agg), ds = rep(ds,each=length(data.agg[,1]))) df <- data.frame(xdat = as.vector(data.agg), ds = rep(ds,each=length(data.agg[,1])))
df$station <- rep(station,length(df$xdat)) df$station <- station
df$year <- rep(unique(as.POSIXlt(data.s[,names[1]])$year+1900),length(ds))
return(df) # maxima for all durations at one station return(df) # maxima for all durations at one station
} }
# which stations should be used? # which stations should be used?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment