Commit 2f840980 authored by Jana Ulrich's avatar Jana Ulrich
Browse files

changed d-gev functions output to include names of durations

parent d0f9bc94
......@@ -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))
}
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