CRAN Package Check Results for Package IDF

Last updated on 2020-03-13 16:46:46 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1 7.35 62.23 69.58 ERROR
r-devel-linux-x86_64-debian-gcc 1.1 6.68 48.52 55.20 ERROR
r-devel-linux-x86_64-fedora-clang 1.1 84.02 ERROR
r-devel-linux-x86_64-fedora-gcc 1.1 80.54 ERROR
r-devel-windows-ix86+x86_64 1.1 19.00 76.00 95.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.1 13.00 62.00 75.00 OK
r-patched-linux-x86_64 1.1 7.62 53.21 60.83 OK
r-patched-solaris-x86 1.1 124.20 ERROR
r-release-linux-x86_64 1.1 7.57 53.93 61.50 OK
r-release-windows-ix86+x86_64 1.1 13.00 65.00 78.00 OK
r-release-osx-x86_64 1.1 OK
r-oldrel-windows-ix86+x86_64 1.1 7.00 66.00 73.00 OK
r-oldrel-osx-x86_64 1.1 OK

Check Details

Version: 1.1
Check: examples
Result: ERROR
    Running examples in 'IDF-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: IDF.plot
    > ### Title: Plotting IDF curves
    > ### Aliases: IDF.plot
    >
    > ### ** Examples
    >
    > RR <- rgamma(10*30*24,shape=1)
    > year <- sort(rep(1:(10),30*24))
    > data <- data.frame(RR,year)
    > fit <- IDF.fit(data)
    Warning in split.default(v, sigindex) :
     data length is not a multiple of split variable
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    IDF
     --- call from context ---
    minuslogl(mu = c(11.1592739468688, 5.91669773658684, 6.23992043508712,
    2.45185964936121, 2.66962794560922, 1.67975637948261, 1.77395863906835,
    1.48875380546482, 1.27437496733159, 1.13700489332659, 1.21388476551635,
    1, 2, 3, 6, 12, 12, 24, 48, 72, 96), sigma = c(0.814372668953881,
    6.6591568105882, 3.62329733067692, 4.55608048770966, 2.06569743160239,
    1.7707444916949, 1.33808768229581, 1.46667397590304, 1.20551334614974,
    1.22299720662676, 1.07810676486339, 1, 2, 3, 6, 12, 24, 24, 48,
    72, 96), xi = c(0, 6.12806092947411, 4.24569166883207, 2.92854547905267,
    2.89527216959331, 1.82239581613197, 1.55991384548904, 1.22263107400452,
    1.30335206530127, 1.08344542827636, 1.16188006182785, 1, 2, 3,
    6, 12, 24, 48, 48, 72, 96), theta = c(0, 7.37284532409656, 3.35820415837749,
    3.44858082214254, 2.05559887960372, 2.10565895086101, 1.46534607349451,
    1.36831318395377, 1.16187255700388, 1.14769387803455, 1.17128661974972,
    1, 2, 3, 6, 12, 24, 48, 72, 72, 96), eta = c(0.575646398109228,
    9.62681026439069, 4.12784173758614, 2.65882687110602, 2.20414387962605,
    1.43628516273553, 1.76427336243063, 1.21408304083196, 1.3098007564114,
    1.12120167289825, 1.15265165917705, 1, 2, 3, 6, 12, 24, 48, 72,
    96, 96), x = c(7.63393724495519, 7.99367007442106, 5.36628896017253,
    4.13741231980911, 2.44708520685822, 1.77093029379764, 1.24074407438205,
    1.3245601882009, 1.2935437897421, 1.24282748085963, 1, 1, 2,
    3, 6, 12, 24, 48, 72, 96, 0), d = c(6.14977641789297, 5.09108966831373,
    4.07894651665752, 3.61323738699652, 2.44685121930337, 1.68144676158294,
    1.60905332646639, 1.10707575179345, 1.21751345025489, 1.21086284434893,
    1, 2, 2, 3, 6, 12, 24, 48, 72, 96, 0), use.log = c(5.71633061005473,
    4.42887658771173, 3.59392241092365, 3.7884805097628, 2.46555930486218,
    1.72210003338913, 1.35064215254999, 1.34581256180343, 1.11685151342718,
    1.17977130521687, 1, 2, 3, 3, 6, 12, 24, 48, 72, 96), DEBUG = c(12.0419804811611,
    3.58698729772225, 3.32274762988769, 2.30633365747914, 2.1297900600949,
    1.56109896108415, 1.5253822980226, 1.14636413603069, 1.18529835146554,
    1.02295729454928, 1, 2, 3, 6, 6, 12, 24, 48, 72, 96))
     --- call from argument ---
    if (use.log) {
     sigma <- exp(sigma)
     theta <- exp(theta)
     eta <- exp(eta)
    }
     --- R stacktrace ---
    where 1: minuslogl(mu = c(11.1592739468688, 5.91669773658684, 6.23992043508712,
    2.45185964936121, 2.66962794560922, 1.67975637948261, 1.77395863906835,
    1.48875380546482, 1.27437496733159, 1.13700489332659, 1.21388476551635,
    1, 2, 3, 6, 12, 12, 24, 48, 72, 96), sigma = c(0.814372668953881,
    6.6591568105882, 3.62329733067692, 4.55608048770966, 2.06569743160239,
    1.7707444916949, 1.33808768229581, 1.46667397590304, 1.20551334614974,
    1.22299720662676, 1.07810676486339, 1, 2, 3, 6, 12, 24, 24, 48,
    72, 96), xi = c(0, 6.12806092947411, 4.24569166883207, 2.92854547905267,
    2.89527216959331, 1.82239581613197, 1.55991384548904, 1.22263107400452,
    1.30335206530127, 1.08344542827636, 1.16188006182785, 1, 2, 3,
    6, 12, 24, 48, 48, 72, 96), theta = c(0, 7.37284532409656, 3.35820415837749,
    3.44858082214254, 2.05559887960372, 2.10565895086101, 1.46534607349451,
    1.36831318395377, 1.16187255700388, 1.14769387803455, 1.17128661974972,
    1, 2, 3, 6, 12, 24, 48, 72, 72, 96), eta = c(0.575646398109228,
    9.62681026439069, 4.12784173758614, 2.65882687110602, 2.20414387962605,
    1.43628516273553, 1.76427336243063, 1.21408304083196, 1.3098007564114,
    1.12120167289825, 1.15265165917705, 1, 2, 3, 6, 12, 24, 48, 72,
    96, 96), x = c(7.63393724495519, 7.99367007442106, 5.36628896017253,
    4.13741231980911, 2.44708520685822, 1.77093029379764, 1.24074407438205,
    1.3245601882009, 1.2935437897421, 1.24282748085963, 1, 1, 2,
    3, 6, 12, 24, 48, 72, 96, 0), d = c(6.14977641789297, 5.09108966831373,
    4.07894651665752, 3.61323738699652, 2.44685121930337, 1.68144676158294,
    1.60905332646639, 1.10707575179345, 1.21751345025489, 1.21086284434893,
    1, 2, 2, 3, 6, 12, 24, 48, 72, 96, 0), use.log = c(5.71633061005473,
    4.42887658771173, 3.59392241092365, 3.7884805097628, 2.46555930486218,
    1.72210003338913, 1.35064215254999, 1.34581256180343, 1.11685151342718,
    1.17977130521687, 1, 2, 3, 3, 6, 12, 24, 48, 72, 96), DEBUG = c(12.0419804811611,
    3.58698729772225, 3.32274762988769, 2.30633365747914, 2.1297900600949,
    1.56109896108415, 1.5253822980226, 1.14636413603069, 1.18529835146554,
    1.02295729454928, 1, 2, 3, 6, 6, 12, 24, 48, 72, 96))
    where 2: do.call("minuslogl", l)
    where 3: fn(par, ...)
    where 4: (function (par)
    fn(par, ...))(c(mu = 11.1592739468688, sigma = 0.814372668953881,
    xi = 0, theta = 0, eta = 0.575646398109228))
    where 5: optim(start, f, method = method, hessian = TRUE, ...)
    where 6: mle(IDF.nll, start = list(mu = mu, sigma = sigma, xi = xi, theta = theta,
     eta = eta), fixed = list(x = obs, d = dur, use.log = use.log,
     DEBUG = DEBUG), control = list(trace = 0, maxit = 5000),
     method = method)
    where 7: doTryCatch(return(expr), name, parentenv, handler)
    where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 9: tryCatchList(expr, classes, parentenv, handlers)
    where 10: tryCatch(mle(IDF.nll, start = list(mu = mu, sigma = sigma, xi = xi,
     theta = theta, eta = eta), fixed = list(x = obs, d = dur,
     use.log = use.log, DEBUG = DEBUG), control = list(trace = 0,
     maxit = 5000), method = method), error = function(e) NULL)
    where 11: fit.fun(obs = int.vec, dur = durs, mu = mu.est, sigma = sigma.est,
     xi = xi.est, theta = theta.init, eta = eta.est, use.log = use.log,
     DEBUG = DEBUG, method = method, upper = upper, lower = lower)
    where 12: IDF.fit(data)
    
     --- value of length: 20 type: double ---
     [1] 5.716331 4.428877 3.593922 3.788481 2.465559 1.722100 1.350642
     [8] 1.345813 1.116852 1.179771 1.000000 2.000000 3.000000 3.000000
    [15] 6.000000 12.000000 24.000000 48.000000 72.000000 96.000000
     --- function from context ---
    function (mu = 0, sigma = 1, xi = 0, theta = 0, eta = 1, x, d,
     use.log = F, DEBUG = F)
    {
     if (use.log) {
     sigma <- exp(sigma)
     theta <- exp(theta)
     eta <- exp(eta)
     }
     sigma.d <- sigma/((d + theta)^eta)
     if (DEBUG)
     debug.values <- c(mu, sigma, xi, theta, eta)
     if (sum(is.nan(sigma.d)) == 0) {
     if (xi != 0) {
     C <- 1 + xi * (x/sigma.d - mu)
     nll <- switch((sum(C < 0, na.rm = T) > 0) + 1, sum(log(sigma.d),
     na.rm = T) + (1 + 1/xi) * sum(log(C), na.rm = T) +
     sum((C)^(-1/xi), na.rm = T), NA)
     }
     else if (xi == 0) {
     Y <- x/sigma.d - mu
     nll <- -(-sum(log(sigma.d), na.rm = T) - sum((Y),
     na.rm = T) - sum(exp(-Y), na.rm = T))
     }
     }
     else {
     nll <- NA
     }
     if (DEBUG) {
     cat(debug.values, nll, "\n")
     options(digits.secs = 6)
     }
     return(nll/length(x))
    }
    <bytecode: 0xbdb60a0>
    <environment: namespace:IDF>
     --- function search by body ---
    Function IDF.nll in namespace IDF has this body.
     ----------- END OF FAILURE REPORT --------------
    Warning: optimization did not converge and no parameters were estimated.
    > param <- fit$par
    > IDF.plot(pars=param,st.name="example",dt.name="rgamma")
    Error in if (min(scale) < 0) stop("invalid scale") :
     missing value where TRUE/FALSE needed
    Calls: IDF.plot -> qgev.d -> qgev
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.1
Check: examples
Result: ERROR
    Running examples in ‘IDF-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: IDF.plot
    > ### Title: Plotting IDF curves
    > ### Aliases: IDF.plot
    >
    > ### ** Examples
    >
    > RR <- rgamma(10*30*24,shape=1)
    > year <- sort(rep(1:(10),30*24))
    > data <- data.frame(RR,year)
    > fit <- IDF.fit(data)
    Warning in split.default(v, sigindex) :
     data length is not a multiple of split variable
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    IDF
     --- call from context ---
    minuslogl(mu = c(11.1592739468688, 5.91669773658684, 6.23992043508712,
    2.45185964936121, 2.66962794560922, 1.67975637948261, 1.77395863906835,
    1.48875380546482, 1.27437496733159, 1.13700489332659, 1.21388476551635,
    1, 2, 3, 6, 12, 12, 24, 48, 72, 96), sigma = c(0.814372668953881,
    6.6591568105882, 3.62329733067692, 4.55608048770966, 2.06569743160239,
    1.7707444916949, 1.33808768229581, 1.46667397590304, 1.20551334614974,
    1.22299720662676, 1.07810676486339, 1, 2, 3, 6, 12, 24, 24, 48,
    72, 96), xi = c(0, 6.12806092947411, 4.24569166883207, 2.92854547905267,
    2.89527216959331, 1.82239581613197, 1.55991384548904, 1.22263107400452,
    1.30335206530127, 1.08344542827636, 1.16188006182785, 1, 2, 3,
    6, 12, 24, 48, 48, 72, 96), theta = c(0, 7.37284532409656, 3.35820415837749,
    3.44858082214254, 2.05559887960372, 2.10565895086101, 1.46534607349451,
    1.36831318395377, 1.16187255700388, 1.14769387803455, 1.17128661974972,
    1, 2, 3, 6, 12, 24, 48, 72, 72, 96), eta = c(0.575646398109228,
    9.62681026439069, 4.12784173758614, 2.65882687110602, 2.20414387962605,
    1.43628516273553, 1.76427336243063, 1.21408304083196, 1.3098007564114,
    1.12120167289825, 1.15265165917705, 1, 2, 3, 6, 12, 24, 48, 72,
    96, 96), x = c(7.63393724495519, 7.99367007442106, 5.36628896017253,
    4.13741231980911, 2.44708520685822, 1.77093029379764, 1.24074407438205,
    1.3245601882009, 1.2935437897421, 1.24282748085963, 1, 1, 2,
    3, 6, 12, 24, 48, 72, 96, 0), d = c(6.14977641789297, 5.09108966831373,
    4.07894651665752, 3.61323738699652, 2.44685121930337, 1.68144676158294,
    1.60905332646639, 1.10707575179345, 1.21751345025489, 1.21086284434893,
    1, 2, 2, 3, 6, 12, 24, 48, 72, 96, 0), use.log = c(5.71633061005473,
    4.42887658771173, 3.59392241092365, 3.7884805097628, 2.46555930486218,
    1.72210003338913, 1.35064215254999, 1.34581256180343, 1.11685151342718,
    1.17977130521687, 1, 2, 3, 3, 6, 12, 24, 48, 72, 96), DEBUG = c(12.0419804811611,
    3.58698729772225, 3.32274762988769, 2.30633365747914, 2.1297900600949,
    1.56109896108415, 1.5253822980226, 1.14636413603069, 1.18529835146554,
    1.02295729454928, 1, 2, 3, 6, 6, 12, 24, 48, 72, 96))
     --- call from argument ---
    if (use.log) {
     sigma <- exp(sigma)
     theta <- exp(theta)
     eta <- exp(eta)
    }
     --- R stacktrace ---
    where 1: minuslogl(mu = c(11.1592739468688, 5.91669773658684, 6.23992043508712,
    2.45185964936121, 2.66962794560922, 1.67975637948261, 1.77395863906835,
    1.48875380546482, 1.27437496733159, 1.13700489332659, 1.21388476551635,
    1, 2, 3, 6, 12, 12, 24, 48, 72, 96), sigma = c(0.814372668953881,
    6.6591568105882, 3.62329733067692, 4.55608048770966, 2.06569743160239,
    1.7707444916949, 1.33808768229581, 1.46667397590304, 1.20551334614974,
    1.22299720662676, 1.07810676486339, 1, 2, 3, 6, 12, 24, 24, 48,
    72, 96), xi = c(0, 6.12806092947411, 4.24569166883207, 2.92854547905267,
    2.89527216959331, 1.82239581613197, 1.55991384548904, 1.22263107400452,
    1.30335206530127, 1.08344542827636, 1.16188006182785, 1, 2, 3,
    6, 12, 24, 48, 48, 72, 96), theta = c(0, 7.37284532409656, 3.35820415837749,
    3.44858082214254, 2.05559887960372, 2.10565895086101, 1.46534607349451,
    1.36831318395377, 1.16187255700388, 1.14769387803455, 1.17128661974972,
    1, 2, 3, 6, 12, 24, 48, 72, 72, 96), eta = c(0.575646398109228,
    9.62681026439069, 4.12784173758614, 2.65882687110602, 2.20414387962605,
    1.43628516273553, 1.76427336243063, 1.21408304083196, 1.3098007564114,
    1.12120167289825, 1.15265165917705, 1, 2, 3, 6, 12, 24, 48, 72,
    96, 96), x = c(7.63393724495519, 7.99367007442106, 5.36628896017253,
    4.13741231980911, 2.44708520685822, 1.77093029379764, 1.24074407438205,
    1.3245601882009, 1.2935437897421, 1.24282748085963, 1, 1, 2,
    3, 6, 12, 24, 48, 72, 96, 0), d = c(6.14977641789297, 5.09108966831373,
    4.07894651665752, 3.61323738699652, 2.44685121930337, 1.68144676158294,
    1.60905332646639, 1.10707575179345, 1.21751345025489, 1.21086284434893,
    1, 2, 2, 3, 6, 12, 24, 48, 72, 96, 0), use.log = c(5.71633061005473,
    4.42887658771173, 3.59392241092365, 3.7884805097628, 2.46555930486218,
    1.72210003338913, 1.35064215254999, 1.34581256180343, 1.11685151342718,
    1.17977130521687, 1, 2, 3, 3, 6, 12, 24, 48, 72, 96), DEBUG = c(12.0419804811611,
    3.58698729772225, 3.32274762988769, 2.30633365747914, 2.1297900600949,
    1.56109896108415, 1.5253822980226, 1.14636413603069, 1.18529835146554,
    1.02295729454928, 1, 2, 3, 6, 6, 12, 24, 48, 72, 96))
    where 2: do.call("minuslogl", l)
    where 3: fn(par, ...)
    where 4: (function (par)
    fn(par, ...))(c(mu = 11.1592739468688, sigma = 0.814372668953881,
    xi = 0, theta = 0, eta = 0.575646398109228))
    where 5: optim(start, f, method = method, hessian = TRUE, ...)
    where 6: mle(IDF.nll, start = list(mu = mu, sigma = sigma, xi = xi, theta = theta,
     eta = eta), fixed = list(x = obs, d = dur, use.log = use.log,
     DEBUG = DEBUG), control = list(trace = 0, maxit = 5000),
     method = method)
    where 7: doTryCatch(return(expr), name, parentenv, handler)
    where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 9: tryCatchList(expr, classes, parentenv, handlers)
    where 10: tryCatch(mle(IDF.nll, start = list(mu = mu, sigma = sigma, xi = xi,
     theta = theta, eta = eta), fixed = list(x = obs, d = dur,
     use.log = use.log, DEBUG = DEBUG), control = list(trace = 0,
     maxit = 5000), method = method), error = function(e) NULL)
    where 11: fit.fun(obs = int.vec, dur = durs, mu = mu.est, sigma = sigma.est,
     xi = xi.est, theta = theta.init, eta = eta.est, use.log = use.log,
     DEBUG = DEBUG, method = method, upper = upper, lower = lower)
    where 12: IDF.fit(data)
    
     --- value of length: 20 type: double ---
     [1] 5.716331 4.428877 3.593922 3.788481 2.465559 1.722100 1.350642
     [8] 1.345813 1.116852 1.179771 1.000000 2.000000 3.000000 3.000000
    [15] 6.000000 12.000000 24.000000 48.000000 72.000000 96.000000
     --- function from context ---
    function (mu = 0, sigma = 1, xi = 0, theta = 0, eta = 1, x, d,
     use.log = F, DEBUG = F)
    {
     if (use.log) {
     sigma <- exp(sigma)
     theta <- exp(theta)
     eta <- exp(eta)
     }
     sigma.d <- sigma/((d + theta)^eta)
     if (DEBUG)
     debug.values <- c(mu, sigma, xi, theta, eta)
     if (sum(is.nan(sigma.d)) == 0) {
     if (xi != 0) {
     C <- 1 + xi * (x/sigma.d - mu)
     nll <- switch((sum(C < 0, na.rm = T) > 0) + 1, sum(log(sigma.d),
     na.rm = T) + (1 + 1/xi) * sum(log(C), na.rm = T) +
     sum((C)^(-1/xi), na.rm = T), NA)
     }
     else if (xi == 0) {
     Y <- x/sigma.d - mu
     nll <- -(-sum(log(sigma.d), na.rm = T) - sum((Y),
     na.rm = T) - sum(exp(-Y), na.rm = T))
     }
     }
     else {
     nll <- NA
     }
     if (DEBUG) {
     cat(debug.values, nll, "\n")
     options(digits.secs = 6)
     }
     return(nll/length(x))
    }
    <bytecode: 0x56470f585fe8>
    <environment: namespace:IDF>
     --- function search by body ---
    Function IDF.nll in namespace IDF has this body.
     ----------- END OF FAILURE REPORT --------------
    Warning: optimization did not converge and no parameters were estimated.
    > param <- fit$par
    > IDF.plot(pars=param,st.name="example",dt.name="rgamma")
    Error in if (min(scale) < 0) stop("invalid scale") :
     missing value where TRUE/FALSE needed
    Calls: IDF.plot -> qgev.d -> qgev
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.1
Check: examples
Result: ERROR
    Running examples in ‘IDF-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: IDF.plot
    > ### Title: Plotting IDF curves
    > ### Aliases: IDF.plot
    >
    > ### ** Examples
    >
    > RR <- rgamma(10*30*24,shape=1)
    > year <- sort(rep(1:(10),30*24))
    > data <- data.frame(RR,year)
    > fit <- IDF.fit(data)
    Warning in split.default(v, sigindex) :
     data length is not a multiple of split variable
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    IDF
     --- call from context ---
    minuslogl(mu = c(11.1592739468688, 5.91669773658684, 6.23992043508712,
    2.45185964936121, 2.66962794560922, 1.67975637948261, 1.77395863906835,
    1.48875380546482, 1.27437496733159, 1.13700489332659, 1.21388476551635,
    1, 2, 3, 6, 12, 12, 24, 48, 72, 96), sigma = c(0.814372668953881,
    6.6591568105882, 3.62329733067692, 4.55608048770966, 2.06569743160239,
    1.7707444916949, 1.33808768229581, 1.46667397590304, 1.20551334614974,
    1.22299720662676, 1.07810676486339, 1, 2, 3, 6, 12, 24, 24, 48,
    72, 96), xi = c(0, 6.12806092947411, 4.24569166883207, 2.92854547905267,
    2.89527216959331, 1.82239581613197, 1.55991384548904, 1.22263107400452,
    1.30335206530127, 1.08344542827636, 1.16188006182785, 1, 2, 3,
    6, 12, 24, 48, 48, 72, 96), theta = c(0, 7.37284532409656, 3.35820415837749,
    3.44858082214254, 2.05559887960372, 2.10565895086101, 1.46534607349451,
    1.36831318395377, 1.16187255700388, 1.14769387803455, 1.17128661974972,
    1, 2, 3, 6, 12, 24, 48, 72, 72, 96), eta = c(0.575646398109228,
    9.62681026439069, 4.12784173758614, 2.65882687110602, 2.20414387962605,
    1.43628516273553, 1.76427336243063, 1.21408304083196, 1.3098007564114,
    1.12120167289825, 1.15265165917705, 1, 2, 3, 6, 12, 24, 48, 72,
    96, 96), x = c(7.63393724495519, 7.99367007442106, 5.36628896017253,
    4.13741231980911, 2.44708520685822, 1.77093029379764, 1.24074407438205,
    1.3245601882009, 1.2935437897421, 1.24282748085963, 1, 1, 2,
    3, 6, 12, 24, 48, 72, 96, 0), d = c(6.14977641789297, 5.09108966831373,
    4.07894651665752, 3.61323738699652, 2.44685121930337, 1.68144676158294,
    1.60905332646639, 1.10707575179345, 1.21751345025489, 1.21086284434893,
    1, 2, 2, 3, 6, 12, 24, 48, 72, 96, 0), use.log = c(5.71633061005473,
    4.42887658771173, 3.59392241092365, 3.7884805097628, 2.46555930486218,
    1.72210003338913, 1.35064215254999, 1.34581256180343, 1.11685151342718,
    1.17977130521687, 1, 2, 3, 3, 6, 12, 24, 48, 72, 96), DEBUG = c(12.0419804811611,
    3.58698729772225, 3.32274762988769, 2.30633365747914, 2.1297900600949,
    1.56109896108415, 1.5253822980226, 1.14636413603069, 1.18529835146554,
    1.02295729454928, 1, 2, 3, 6, 6, 12, 24, 48, 72, 96))
     --- call from argument ---
    if (use.log) {
     sigma <- exp(sigma)
     theta <- exp(theta)
     eta <- exp(eta)
    }
     --- R stacktrace ---
    where 1: minuslogl(mu = c(11.1592739468688, 5.91669773658684, 6.23992043508712,
    2.45185964936121, 2.66962794560922, 1.67975637948261, 1.77395863906835,
    1.48875380546482, 1.27437496733159, 1.13700489332659, 1.21388476551635,
    1, 2, 3, 6, 12, 12, 24, 48, 72, 96), sigma = c(0.814372668953881,
    6.6591568105882, 3.62329733067692, 4.55608048770966, 2.06569743160239,
    1.7707444916949, 1.33808768229581, 1.46667397590304, 1.20551334614974,
    1.22299720662676, 1.07810676486339, 1, 2, 3, 6, 12, 24, 24, 48,
    72, 96), xi = c(0, 6.12806092947411, 4.24569166883207, 2.92854547905267,
    2.89527216959331, 1.82239581613197, 1.55991384548904, 1.22263107400452,
    1.30335206530127, 1.08344542827636, 1.16188006182785, 1, 2, 3,
    6, 12, 24, 48, 48, 72, 96), theta = c(0, 7.37284532409656, 3.35820415837749,
    3.44858082214254, 2.05559887960372, 2.10565895086101, 1.46534607349451,
    1.36831318395377, 1.16187255700388, 1.14769387803455, 1.17128661974972,
    1, 2, 3, 6, 12, 24, 48, 72, 72, 96), eta = c(0.575646398109228,
    9.62681026439069, 4.12784173758614, 2.65882687110602, 2.20414387962605,
    1.43628516273553, 1.76427336243063, 1.21408304083196, 1.3098007564114,
    1.12120167289825, 1.15265165917705, 1, 2, 3, 6, 12, 24, 48, 72,
    96, 96), x = c(7.63393724495519, 7.99367007442106, 5.36628896017253,
    4.13741231980911, 2.44708520685822, 1.77093029379764, 1.24074407438205,
    1.3245601882009, 1.2935437897421, 1.24282748085963, 1, 1, 2,
    3, 6, 12, 24, 48, 72, 96, 0), d = c(6.14977641789297, 5.09108966831373,
    4.07894651665752, 3.61323738699652, 2.44685121930337, 1.68144676158294,
    1.60905332646639, 1.10707575179345, 1.21751345025489, 1.21086284434893,
    1, 2, 2, 3, 6, 12, 24, 48, 72, 96, 0), use.log = c(5.71633061005473,
    4.42887658771173, 3.59392241092365, 3.7884805097628, 2.46555930486218,
    1.72210003338913, 1.35064215254999, 1.34581256180343, 1.11685151342718,
    1.17977130521687, 1, 2, 3, 3, 6, 12, 24, 48, 72, 96), DEBUG = c(12.0419804811611,
    3.58698729772225, 3.32274762988769, 2.30633365747914, 2.1297900600949,
    1.56109896108415, 1.5253822980226, 1.14636413603069, 1.18529835146554,
    1.02295729454928, 1, 2, 3, 6, 6, 12, 24, 48, 72, 96))
    where 2: do.call("minuslogl", l)
    where 3: fn(par, ...)
    where 4: (function (par)
    fn(par, ...))(c(mu = 11.1592739468688, sigma = 0.814372668953881,
    xi = 0, theta = 0, eta = 0.575646398109228))
    where 5: optim(start, f, method = method, hessian = TRUE, ...)
    where 6: mle(IDF.nll, start = list(mu = mu, sigma = sigma, xi = xi, theta = theta,
     eta = eta), fixed = list(x = obs, d = dur, use.log = use.log,
     DEBUG = DEBUG), control = list(trace = 0, maxit = 5000),
     method = method)
    where 7: doTryCatch(return(expr), name, parentenv, handler)
    where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 9: tryCatchList(expr, classes, parentenv, handlers)
    where 10: tryCatch(mle(IDF.nll, start = list(mu = mu, sigma = sigma, xi = xi,
     theta = theta, eta = eta), fixed = list(x = obs, d = dur,
     use.log = use.log, DEBUG = DEBUG), control = list(trace = 0,
     maxit = 5000), method = method), error = function(e) NULL)
    where 11: fit.fun(obs = int.vec, dur = durs, mu = mu.est, sigma = sigma.est,
     xi = xi.est, theta = theta.init, eta = eta.est, use.log = use.log,
     DEBUG = DEBUG, method = method, upper = upper, lower = lower)
    where 12: IDF.fit(data)
    
     --- value of length: 20 type: double ---
     [1] 5.716331 4.428877 3.593922 3.788481 2.465559 1.722100 1.350642
     [8] 1.345813 1.116852 1.179771 1.000000 2.000000 3.000000 3.000000
    [15] 6.000000 12.000000 24.000000 48.000000 72.000000 96.000000
     --- function from context ---
    function (mu = 0, sigma = 1, xi = 0, theta = 0, eta = 1, x, d,
     use.log = F, DEBUG = F)
    {
     if (use.log) {
     sigma <- exp(sigma)
     theta <- exp(theta)
     eta <- exp(eta)
     }
     sigma.d <- sigma/((d + theta)^eta)
     if (DEBUG)
     debug.values <- c(mu, sigma, xi, theta, eta)
     if (sum(is.nan(sigma.d)) == 0) {
     if (xi != 0) {
     C <- 1 + xi * (x/sigma.d - mu)
     nll <- switch((sum(C < 0, na.rm = T) > 0) + 1, sum(log(sigma.d),
     na.rm = T) + (1 + 1/xi) * sum(log(C), na.rm = T) +
     sum((C)^(-1/xi), na.rm = T), NA)
     }
     else if (xi == 0) {
     Y <- x/sigma.d - mu
     nll <- -(-sum(log(sigma.d), na.rm = T) - sum((Y),
     na.rm = T) - sum(exp(-Y), na.rm = T))
     }
     }
     else {
     nll <- NA
     }
     if (DEBUG) {
     cat(debug.values, nll, "\n")
     options(digits.secs = 6)
     }
     return(nll/length(x))
    }
    <bytecode: 0xe036a48>
    <environment: namespace:IDF>
     --- function search by body ---
    Function IDF.nll in namespace IDF has this body.
     ----------- END OF FAILURE REPORT --------------
    Warning: optimization did not converge and no parameters were estimated.
    > param <- fit$par
    > IDF.plot(pars=param,st.name="example",dt.name="rgamma")
    Error in if (min(scale) < 0) stop("invalid scale") :
     missing value where TRUE/FALSE needed
    Calls: IDF.plot -> qgev.d -> qgev
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.1
Check: examples
Result: ERROR
    Running examples in ‘IDF-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: IDF.plot
    > ### Title: Plotting IDF curves
    > ### Aliases: IDF.plot
    >
    > ### ** Examples
    >
    > RR <- rgamma(10*30*24,shape=1)
    > year <- sort(rep(1:(10),30*24))
    > data <- data.frame(RR,year)
    > fit <- IDF.fit(data)
    Warning in split.default(v, sigindex) :
     data length is not a multiple of split variable
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    IDF
     --- call from context ---
    minuslogl(mu = c(11.1592739468688, 5.91669773658684, 6.23992043508712,
    2.45185964936121, 2.66962794560922, 1.67975637948261, 1.77395863906835,
    1.48875380546482, 1.27437496733159, 1.13700489332659, 1.21388476551635,
    1, 2, 3, 6, 12, 12, 24, 48, 72, 96), sigma = c(0.814372668953881,
    6.6591568105882, 3.62329733067692, 4.55608048770966, 2.06569743160239,
    1.7707444916949, 1.33808768229581, 1.46667397590304, 1.20551334614974,
    1.22299720662676, 1.07810676486339, 1, 2, 3, 6, 12, 24, 24, 48,
    72, 96), xi = c(0, 6.12806092947411, 4.24569166883207, 2.92854547905267,
    2.89527216959331, 1.82239581613197, 1.55991384548904, 1.22263107400452,
    1.30335206530127, 1.08344542827636, 1.16188006182785, 1, 2, 3,
    6, 12, 24, 48, 48, 72, 96), theta = c(0, 7.37284532409656, 3.35820415837749,
    3.44858082214254, 2.05559887960372, 2.10565895086101, 1.46534607349451,
    1.36831318395377, 1.16187255700388, 1.14769387803455, 1.17128661974972,
    1, 2, 3, 6, 12, 24, 48, 72, 72, 96), eta = c(0.575646398109228,
    9.62681026439069, 4.12784173758614, 2.65882687110602, 2.20414387962605,
    1.43628516273553, 1.76427336243063, 1.21408304083196, 1.3098007564114,
    1.12120167289825, 1.15265165917705, 1, 2, 3, 6, 12, 24, 48, 72,
    96, 96), x = c(7.63393724495519, 7.99367007442106, 5.36628896017253,
    4.13741231980911, 2.44708520685822, 1.77093029379764, 1.24074407438205,
    1.3245601882009, 1.2935437897421, 1.24282748085963, 1, 1, 2,
    3, 6, 12, 24, 48, 72, 96, 0), d = c(6.14977641789297, 5.09108966831373,
    4.07894651665752, 3.61323738699652, 2.44685121930337, 1.68144676158294,
    1.60905332646639, 1.10707575179345, 1.21751345025489, 1.21086284434893,
    1, 2, 2, 3, 6, 12, 24, 48, 72, 96, 0), use.log = c(5.71633061005473,
    4.42887658771173, 3.59392241092365, 3.7884805097628, 2.46555930486218,
    1.72210003338913, 1.35064215254999, 1.34581256180343, 1.11685151342718,
    1.17977130521687, 1, 2, 3, 3, 6, 12, 24, 48, 72, 96), DEBUG = c(12.0419804811611,
    3.58698729772225, 3.32274762988769, 2.30633365747914, 2.1297900600949,
    1.56109896108415, 1.5253822980226, 1.14636413603069, 1.18529835146554,
    1.02295729454928, 1, 2, 3, 6, 6, 12, 24, 48, 72, 96))
     --- call from argument ---
    if (use.log) {
     sigma <- exp(sigma)
     theta <- exp(theta)
     eta <- exp(eta)
    }
     --- R stacktrace ---
    where 1: minuslogl(mu = c(11.1592739468688, 5.91669773658684, 6.23992043508712,
    2.45185964936121, 2.66962794560922, 1.67975637948261, 1.77395863906835,
    1.48875380546482, 1.27437496733159, 1.13700489332659, 1.21388476551635,
    1, 2, 3, 6, 12, 12, 24, 48, 72, 96), sigma = c(0.814372668953881,
    6.6591568105882, 3.62329733067692, 4.55608048770966, 2.06569743160239,
    1.7707444916949, 1.33808768229581, 1.46667397590304, 1.20551334614974,
    1.22299720662676, 1.07810676486339, 1, 2, 3, 6, 12, 24, 24, 48,
    72, 96), xi = c(0, 6.12806092947411, 4.24569166883207, 2.92854547905267,
    2.89527216959331, 1.82239581613197, 1.55991384548904, 1.22263107400452,
    1.30335206530127, 1.08344542827636, 1.16188006182785, 1, 2, 3,
    6, 12, 24, 48, 48, 72, 96), theta = c(0, 7.37284532409656, 3.35820415837749,
    3.44858082214254, 2.05559887960372, 2.10565895086101, 1.46534607349451,
    1.36831318395377, 1.16187255700388, 1.14769387803455, 1.17128661974972,
    1, 2, 3, 6, 12, 24, 48, 72, 72, 96), eta = c(0.575646398109228,
    9.62681026439069, 4.12784173758614, 2.65882687110602, 2.20414387962605,
    1.43628516273553, 1.76427336243063, 1.21408304083196, 1.3098007564114,
    1.12120167289825, 1.15265165917705, 1, 2, 3, 6, 12, 24, 48, 72,
    96, 96), x = c(7.63393724495519, 7.99367007442106, 5.36628896017253,
    4.13741231980911, 2.44708520685822, 1.77093029379764, 1.24074407438205,
    1.3245601882009, 1.2935437897421, 1.24282748085963, 1, 1, 2,
    3, 6, 12, 24, 48, 72, 96, 0), d = c(6.14977641789297, 5.09108966831373,
    4.07894651665752, 3.61323738699652, 2.44685121930337, 1.68144676158294,
    1.60905332646639, 1.10707575179345, 1.21751345025489, 1.21086284434893,
    1, 2, 2, 3, 6, 12, 24, 48, 72, 96, 0), use.log = c(5.71633061005473,
    4.42887658771173, 3.59392241092365, 3.7884805097628, 2.46555930486218,
    1.72210003338913, 1.35064215254999, 1.34581256180343, 1.11685151342718,
    1.17977130521687, 1, 2, 3, 3, 6, 12, 24, 48, 72, 96), DEBUG = c(12.0419804811611,
    3.58698729772225, 3.32274762988769, 2.30633365747914, 2.1297900600949,
    1.56109896108415, 1.5253822980226, 1.14636413603069, 1.18529835146554,
    1.02295729454928, 1, 2, 3, 6, 6, 12, 24, 48, 72, 96))
    where 2: do.call("minuslogl", l)
    where 3: fn(par, ...)
    where 4: (function (par)
    fn(par, ...))(c(mu = 11.1592739468688, sigma = 0.814372668953881,
    xi = 0, theta = 0, eta = 0.575646398109228))
    where 5: optim(start, f, method = method, hessian = TRUE, ...)
    where 6: mle(IDF.nll, start = list(mu = mu, sigma = sigma, xi = xi, theta = theta,
     eta = eta), fixed = list(x = obs, d = dur, use.log = use.log,
     DEBUG = DEBUG), control = list(trace = 0, maxit = 5000),
     method = method)
    where 7: doTryCatch(return(expr), name, parentenv, handler)
    where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 9: tryCatchList(expr, classes, parentenv, handlers)
    where 10: tryCatch(mle(IDF.nll, start = list(mu = mu, sigma = sigma, xi = xi,
     theta = theta, eta = eta), fixed = list(x = obs, d = dur,
     use.log = use.log, DEBUG = DEBUG), control = list(trace = 0,
     maxit = 5000), method = method), error = function(e) NULL)
    where 11: fit.fun(obs = int.vec, dur = durs, mu = mu.est, sigma = sigma.est,
     xi = xi.est, theta = theta.init, eta = eta.est, use.log = use.log,
     DEBUG = DEBUG, method = method, upper = upper, lower = lower)
    where 12: IDF.fit(data)
    
     --- value of length: 20 type: double ---
     [1] 5.716331 4.428877 3.593922 3.788481 2.465559 1.722100 1.350642
     [8] 1.345813 1.116852 1.179771 1.000000 2.000000 3.000000 3.000000
    [15] 6.000000 12.000000 24.000000 48.000000 72.000000 96.000000
     --- function from context ---
    function (mu = 0, sigma = 1, xi = 0, theta = 0, eta = 1, x, d,
     use.log = F, DEBUG = F)
    {
     if (use.log) {
     sigma <- exp(sigma)
     theta <- exp(theta)
     eta <- exp(eta)
     }
     sigma.d <- sigma/((d + theta)^eta)
     if (DEBUG)
     debug.values <- c(mu, sigma, xi, theta, eta)
     if (sum(is.nan(sigma.d)) == 0) {
     if (xi != 0) {
     C <- 1 + xi * (x/sigma.d - mu)
     nll <- switch((sum(C < 0, na.rm = T) > 0) + 1, sum(log(sigma.d),
     na.rm = T) + (1 + 1/xi) * sum(log(C), na.rm = T) +
     sum((C)^(-1/xi), na.rm = T), NA)
     }
     else if (xi == 0) {
     Y <- x/sigma.d - mu
     nll <- -(-sum(log(sigma.d), na.rm = T) - sum((Y),
     na.rm = T) - sum(exp(-Y), na.rm = T))
     }
     }
     else {
     nll <- NA
     }
     if (DEBUG) {
     cat(debug.values, nll, "\n")
     options(digits.secs = 6)
     }
     return(nll/length(x))
    }
    <bytecode: 0xc5ab9f8>
    <environment: namespace:IDF>
     --- function search by body ---
    Function IDF.nll in namespace IDF has this body.
     ----------- END OF FAILURE REPORT --------------
    Warning: optimization did not converge and no parameters were estimated.
    > param <- fit$par
    > IDF.plot(pars=param,st.name="example",dt.name="rgamma")
    Error in if (min(scale) < 0) stop("invalid scale") :
     missing value where TRUE/FALSE needed
    Calls: IDF.plot -> qgev.d -> qgev
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 1.1
Check: examples
Result: ERROR
    Running examples in ‘IDF-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: IDF.plot
    > ### Title: Plotting IDF curves
    > ### Aliases: IDF.plot
    >
    > ### ** Examples
    >
    > RR <- rgamma(10*30*24,shape=1)
    > year <- sort(rep(1:(10),30*24))
    > data <- data.frame(RR,year)
    > fit <- IDF.fit(data)
    Warning in split.default(v, sigindex) :
     data length is not a multiple of split variable
    Warning in if (use.log) { :
     the condition has length > 1 and only the first element will be used
    Warning in if (DEBUG) debug.values <- c(mu, sigma, xi, theta, eta) :
     the condition has length > 1 and only the first element will be used
    Warning in if (xi != 0) { :
     the condition has length > 1 and only the first element will be used
    Warning in if (xi == 0) { :
     the condition has length > 1 and only the first element will be used
    Warning in if (DEBUG) { :
     the condition has length > 1 and only the first element will be used
    11.15927 5.916698 6.23992 2.45186 2.669628 1.679756 1.773959 1.488754 1.274375 1.137005 1.213885 1 2 3 6 12 12 24 48 72 96 2.257759 779.8931 37.46089 95.20957 7.890799 5.875226 3.811747 4.334794 3.338472 3.397355 2.93911 2.718282 7.389056 20.08554 403.4288 162754.8 26489122130 26489122130 7.016736e+20 1.858672e+31 4.923458e+41 0 6.128061 4.245692 2.928545 2.895272 1.822396 1.559914 1.222631 1.303352 1.083445 1.16188 1 2 3 6 12 24 48 48 72 96 1 1592.158 28.73754 31.45572 7.811515 8.212513 4.329041 3.928718 3.195912 3.150918 3.226141 2.718282 7.389056 20.08554 403.4288 162754.8 26489122130 7.016736e+20 1.858672e+31 1.858672e+31 4.923458e+41 1.77828 15165.98 62.04387 14.27953 9.06249 4.205046 5.837329 3.367205 3.705435 3.068539 3.166578 2.718282 7.389056 20.08554 403.4288 162754.8 26489122130 7.016736e+20 1.858672e+31 4.923458e+41 4.923458e+41 NaN
    Warning: optimization did not converge and no parameters were estimated.
    > param <- fit$par
    > IDF.plot(pars=param,st.name="example",dt.name="rgamma")
    Error in if (min(scale) < 0) stop("invalid scale") :
     missing value where TRUE/FALSE needed
    Calls: IDF.plot -> qgev.d -> qgev
    Execution halted
Flavor: r-patched-solaris-x86