IDF.agg.Rd 2.67 KB
 Christoph Ritschel committed Jan 22, 2018 1 % Generated by roxygen2: do not edit by hand  Rust Henning committed Feb 03, 2016 2 3 4 % Please edit documentation in R/IDF.R \name{IDF.agg} \alias{IDF.agg}  5 \title{Aggregation and annual maxima for chosen durations}  Rust Henning committed Feb 03, 2016 6 \usage{  Laura Mack committed Jul 30, 2020 7 8 9 10 11 IDF.agg( data, ds, na.accept = 0, which.stations = NULL,  Jana Ulrich committed Oct 06, 2020 12  which.mon = list(0:11),  Laura Mack committed Jul 30, 2020 13  names = c("date", "RR"),  Jana Ulrich committed Jan 13, 2021 14  cl = 1  Laura Mack committed Jul 30, 2020 15 )  Rust Henning committed Feb 03, 2016 16 17 } \arguments{  18 \item{data}{list of data.frames containing time series for every station.  Laura Mack committed Jul 30, 2020 19 The data.frame must have the columns 'date' and 'RR' unless other names  20 21 are specified in the parameter names. The column 'date' must contain strings with standard date format.}  Rust Henning committed Feb 03, 2016 22   Jana Ulrich committed Jan 13, 2021 23 \item{ds}{numeric vector of aggregation durations in hours.  24 (Must be multiples of time resolution at all stations.)}  Christoph Ritschel committed Jan 22, 2018 25   26 27 \item{na.accept}{numeric in [0,1) giving maximum percentage of missing values for which block max. should still be calculated.}  Jana Ulrich committed May 10, 2019 28   29 30 \item{which.stations}{optional, subset of stations. Either numeric vector or character vector containing names of elements in data. If not given, all elements in data will be used.}  Christoph Ritschel committed Jan 22, 2018 31   Laura Mack committed Nov 22, 2020 32 \item{which.mon}{optional, subset of months (as list containing values from 0 to 11) of which to calculate the annual maxima from.}  Christoph Ritschel committed Jan 22, 2018 33   34 \item{names}{optional, character vector of length 2, containing the names of the columns to be used.}  Christoph Ritschel committed Jan 22, 2018 35   Jana Ulrich committed Jan 13, 2021 36 \item{cl}{optional, number of cores to be used from \code{\link[parallel]{parLapply}} for parallel computing.}  37 38 } \value{  Jana Ulrich committed Nov 24, 2020 39 40 data.frame containing the annual intensity maxima [mm/h] in $xdat, the corresponding duration in $ds, the $year and month ($mon) in which the maxima occured  41 and the station id or name in \$station.  Rust Henning committed Feb 03, 2016 42 43 } \description{  44 45 46 47 48 49 Aggregates several time series for chosen durations and finds annual maxima (either for the whole year or chosen months). Returns data.frame that can be used for the function \code{\link{gev.d.fit}}. } \details{ If data contains stations with different time resolutions that need to be aggregated at  Laura Mack committed Jul 30, 2020 50 51 different durations, IDF.agg needs to be run separately for the different groups of stations. Afterwards the results can be joint together using rbind.  Rust Henning committed Feb 03, 2016 52 }  Christoph Ritschel committed Jan 22, 2018 53 \examples{  54 55 56 57 dates <- as.Date("2019-01-01")+0:729 x <- rgamma(n = 730, shape = 0.4, rate = 0.5) df <- data.frame(date=dates,RR=x)  Jana Ulrich committed Nov 24, 2020 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 # get annual maxima IDF.agg(list('Sample'= df),ds=c(24,48),na.accept = 0.01) ## xdat ds year mon station ## 0.2853811 24 2019 0:11 Sample ## 0.5673122 24 2020 0:11 Sample ## 0.1598448 48 2019 0:11 Sample ## 0.3112713 48 2020 0:11 Sample # get monthly maxima for each month of june, july and august IDF.agg(list('Sample'=df),ds=c(24,48),na.accept = 0.01,which.mon = list(5,6,7)) # get maxima for time range from june to august IDF.agg(list('Sample'=df),ds=c(24,48),na.accept = 0.01,which.mon = list(5:7))  Rust Henning committed Feb 03, 2016 73 }  74 75 \seealso{ \code{\link{pgev.d}}  Rust Henning committed Feb 03, 2016 76 }