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
2f840980
Commit
2f840980
authored
May 15, 2019
by
Jana Ulrich
Browse files
changed d-gev functions output to include names of durations
parent
d0f9bc94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
R/d-gev.R
R/d-gev.R
+12
-4
No files found.
R/d-gev.R
View file @
2f840980
...
...
@@ -49,7 +49,9 @@ dgev.d <- function(q,mut,sigma0,xi,theta,eta,d,...) {
return
(
dgev
(
q
,
loc
=
mut
*
sigma.d
,
scale
=
sigma.d
,
shape
=
xi
,
...
))}
}
# calculate for each duration in d
return
(
sapply
(
as.list
(
d
),
densfun
,
simplify
=
FALSE
))
durations
<-
as.list
(
d
)
names
(
durations
)
<-
d
return
(
sapply
(
durations
,
densfun
,
simplify
=
FALSE
))
}
...
...
@@ -96,7 +98,9 @@ pgev.d <- function(q,mut,sigma0,xi,theta,eta,d,...) {
return
(
pgev
(
q
,
loc
=
mut
*
sigma.d
,
scale
=
sigma.d
,
shape
=
xi
,
...
))}
}
# calculate for each duration in d
return
(
sapply
(
as.list
(
d
),
pfun
,
simplify
=
FALSE
))
durations
<-
as.list
(
d
)
names
(
durations
)
<-
d
return
(
sapply
(
durations
,
pfun
,
simplify
=
FALSE
))
}
...
...
@@ -152,7 +156,9 @@ qgev.d <- function(p,mut,sigma0,xi,theta,eta,d,...) {
return
(
qgev
(
p
,
loc
=
mut
*
sigma.d
,
scale
=
sigma.d
,
shape
=
xi
,
...
))}
}
# calculate for each duration in d
return
(
sapply
(
as.list
(
d
),
qfun
,
simplify
=
FALSE
))
durations
<-
as.list
(
d
)
names
(
durations
)
<-
d
return
(
sapply
(
durations
,
qfun
,
simplify
=
FALSE
))
}
...
...
@@ -201,7 +207,9 @@ rgev.d <- function(n,mut,sigma0,xi,theta,eta,d) {
return
(
rgev
(
n
,
loc
=
mut
*
sigma.d
,
scale
=
sigma.d
,
shape
=
xi
))}
}
# calculate for each duration in d
return
(
sapply
(
as.list
(
d
),
rfun
,
simplify
=
FALSE
))
durations
<-
as.list
(
d
)
names
(
durations
)
<-
d
return
(
sapply
(
durations
,
rfun
,
simplify
=
FALSE
))
}
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