Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rpackages
IDF
Commits
30bad559
Commit
30bad559
authored
Jul 30, 2020
by
Laura Mack
Browse files
typos
parent
d44032f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
11 deletions
+25
-11
R/IDF.R
R/IDF.R
+4
-4
man/IDF.agg.Rd
man/IDF.agg.Rd
+12
-5
man/IDF.plot.Rd
man/IDF.plot.Rd
+9
-2
No files found.
R/IDF.R
View file @
30bad559
...
...
@@ -11,7 +11,7 @@
#' the function \code{\link{gev.d.fit}}.
#'
#' @param data list of data.frames containing time series for every station.
#' The data.frame must have the columns 'date' and 'RR' unless o
n
ther names
#' The data.frame must have the columns 'date' and 'RR' unless other names
#' are specified in the parameter `names`. The column 'date' must contain strings with
#' standard date format.
#' @param ds numeric vector of aggregation durations.
...
...
@@ -24,8 +24,8 @@
#' @param cl optional, number of cores to be used from \code{\link[pbapply]{pblapply}} for parallelization.
#'
#' @details If data contains stations with different time resolutions that need to be aggregated at
#' different durations, IDF.agg needs to be run sep
e
rately for the different groups of stations.
#' Afterwards he results can be joint together using `rbind`.
#' different durations, IDF.agg needs to be run sep
a
rately for the different groups of stations.
#' Afterwards
t
he results can be joint together using `rbind`.
#'
#' @return data.frame containing the annual intensity maxima [mm/h] in `$xdat`, the corresponding duration in `$ds`
#' and the station id or name in `$station`.
...
...
@@ -64,7 +64,7 @@ IDF.agg <- function(data,ds,na.accept = 0,
dtime
<-
as.numeric
((
data.s
[,
names
[
1
]][
2
]
-
data.s
[,
names
[
1
]][
1
]),
units
=
"hours"
)
if
(
any
(
ds
%%
dtime
!=
0
)){
stop
(
'Given aggr
a
gation durations are not multiples of the time resolution = '
stop
(
'Given aggr
e
gation durations are not multiples of the time resolution = '
,
dtime
,
' of station '
,
station
,
'.'
)}
# function 1: aggregate over single durations and find annual maxima:
...
...
man/IDF.agg.Rd
View file @
30bad559
...
...
@@ -4,12 +4,19 @@
\alias{IDF.agg}
\title{Aggregation and annual maxima for choosen durations}
\usage{
IDF.agg(data, ds, na.accept = 0, which.stations = NULL,
which.mon = 0:11, names = c("date", "RR"), cl = NULL)
IDF.agg(
data,
ds,
na.accept = 0,
which.stations = NULL,
which.mon = 0:11,
names = c("date", "RR"),
cl = NULL
)
}
\arguments{
\item{data}{list of data.frames containing time series for every station.
The data.frame must have the columns 'date' and 'RR' unless o
n
ther names
The data.frame must have the columns 'date' and 'RR' unless other names
are specified in the parameter `names`. The column 'date' must contain strings with
standard date format.}
...
...
@@ -38,8 +45,8 @@ the function \code{\link{gev.d.fit}}.
}
\details{
If data contains stations with different time resolutions that need to be aggregated at
different durations, IDF.agg needs to be run sep
e
rately for the different groups of stations.
Afterwards he results can be joint together using `rbind`.
different durations, IDF.agg needs to be run sep
a
rately for the different groups of stations.
Afterwards
t
he results can be joint together using `rbind`.
}
\examples{
dates <- as.Date("2019-01-01")+0:729
...
...
man/IDF.plot.Rd
View file @
30bad559
...
...
@@ -4,8 +4,15 @@
\alias{IDF.plot}
\title{Plotting of IDF curves at a chosen station}
\usage{
IDF.plot(durations, fitparams, probs = c(0.5, 0.9, 0.99), cols = 4:2,
add = FALSE, legend = TRUE, ...)
IDF.plot(
durations,
fitparams,
probs = c(0.5, 0.9, 0.99),
cols = 4:2,
add = FALSE,
legend = TRUE,
...
)
}
\arguments{
\item{durations}{vector of durations for which to calculate the quantiles.}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment