CRAN Package Check Results for Package hydroPSO

Last updated on 2020-02-19 10:48:55 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.4-1 22.76 150.04 172.80 ERROR
r-devel-linux-x86_64-debian-gcc 0.4-1 19.24 111.82 131.06 ERROR
r-devel-linux-x86_64-fedora-clang 0.4-1 204.90 ERROR
r-devel-linux-x86_64-fedora-gcc 0.4-1 203.07 ERROR
r-devel-windows-ix86+x86_64 0.4-1 46.00 172.00 218.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.4-1 74.00 247.00 321.00 OK
r-patched-linux-x86_64 0.4-1 21.62 127.43 149.05 OK
r-patched-solaris-x86 0.4-1 264.30 OK
r-release-linux-x86_64 0.4-1 20.05 126.55 146.60 OK
r-release-windows-ix86+x86_64 0.4-1 44.00 154.00 198.00 OK
r-release-osx-x86_64 0.4-1 OK
r-oldrel-windows-ix86+x86_64 0.4-1 29.00 147.00 176.00 OK
r-oldrel-osx-x86_64 0.4-1 OK

Check Details

Version: 0.4-1
Check: examples
Result: ERROR
    Running examples in 'hydroPSO-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: quant2ecdf
    > ### Title: Simulated Values -> Empirical CDFs
    > ### Aliases: quant2ecdf quant2ecdf.default quant2ecdf.matrix
    > ### quant2ecdf.data.frame
    > ### Keywords: math manip graph
    >
    > ### ** Examples
    >
    > # random matrix with 100 simulated values (in columns) corresponding to 10
    > # different behavioural parameter sets
    > x <- matrix(rnorm(1000), ncol=10, nrow=100)
    >
    > # empirical CDFs for the quantiles 0.05, 0.5 and 0.95, with equal weight for
    > # each parameter set
    > quant2ecdf(sim=x, weights=1:10, byrow=FALSE)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    hydroPSO
     --- call from context ---
    quant2ecdf.default(sim = sim, weights = weights, byrow = byrow,
     quantiles.desired = quantiles.desired, plot = plot, obs = obs,
     quantiles.labels = quantiles.labels, main = main, ylab = ylab,
     col = col, leg.cex = leg.cex, leg.pos = leg.pos, cex.axis = cex.axis,
     cex.main = cex.main, cex.lab = cex.lab, verbose = verbose,
     ...)
     --- call from argument ---
    if (is.na(match(class(sim), c("matrix", "data.frame")))) stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')")
     --- R stacktrace ---
    where 1: quant2ecdf.default(sim = sim, weights = weights, byrow = byrow,
     quantiles.desired = quantiles.desired, plot = plot, obs = obs,
     quantiles.labels = quantiles.labels, main = main, ylab = ylab,
     col = col, leg.cex = leg.cex, leg.pos = leg.pos, cex.axis = cex.axis,
     cex.main = cex.main, cex.lab = cex.lab, verbose = verbose,
     ...)
    where 2: quant2ecdf.matrix(sim = x, weights = 1:10, byrow = FALSE)
    where 3: quant2ecdf(sim = x, weights = 1:10, byrow = FALSE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (sim, weights = NULL, byrow = TRUE, quantiles.desired = c(0.05,
     0.5, 0.95), plot = TRUE, obs = NULL, quantiles.labels = c("Q5",
     "Q50", "Q95"), main = NULL, ylab = "Probability", col = "blue",
     leg.cex = 1.2, leg.pos = "bottomright", cex.axis = 1.2, cex.main = 1.2,
     cex.lab = 1.2, verbose = TRUE, ...)
    {
     if (is.na(match(class(sim), c("matrix", "data.frame"))))
     stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')")
     ifelse(byrow == TRUE, stg <- "ROW", stg <- "COLUMN")
     if (verbose)
     message("[ Computing un-weighted quantiles for each ",
     stg, " of 'sim' ... ]")
     q5.50.95 <- wquantile(sim, byrow = byrow, probs = quantiles.desired)
     nquantiles <- length(quantiles.desired)
     ecdf <- vector("list", nquantiles)
     if (plot) {
     old.par <- par(no.readonly = TRUE)
     par(mfrow = c(1, nquantiles))
     if (!is.null(main))
     par(oma = c(1, 1, 3, 0))
     }
     ifelse(is.null(weights), stg <- "the UN-weighted", stg <- "the weighted")
     for (i in 1:nquantiles) {
     if (verbose)
     message("[ Computing ", stg, " ECDF for quantile ",
     format(quantiles.desired[i], width = 5, justify = "left"),
     " , ", i, "/", nquantiles, "=>", format(round(100 *
     i/nquantiles, 2), width = 7, justify = "left"),
     "% ... ]")
     x.ecdf <- Hmisc::wtd.Ecdf(q5.50.95[, i], weights = weights,
     normwt = TRUE)
     ecdf[[i]] <- x.ecdf
     names(ecdf)[i] <- quantiles.labels[i]
     if (plot) {
     if (!is.null(obs) & is.numeric(obs)) {
     if (is.na(match(class(obs), c("zoo", "numeric",
     "integer"))))
     stop("Invalid argument: 'class(obs)' must be in c('zoo', 'numeric', 'integer')")
     quantile.obs <- quantile(as.numeric(obs), probs = quantiles.desired[i],
     na.rm = TRUE)
     }
     main.loc <- paste("Empirical CDF of", quantiles.labels[i],
     sep = " ")
     plot(x.ecdf$x, x.ecdf$ecdf, xlab = paste(quantiles.labels[i],
     "[m3/s]", sep = " "), col = col, yaxt = "n",
     type = "b", cex = 0.2, main = main.loc, ylab = ylab,
     cex.axis = cex.axis, cex.main = cex.main, cex.lab = cex.lab,
     font.lab = 2, ...)
     Axis(side = 2, at = seq(0, 1, by = 0.05), labels = FALSE,
     cex.axis = cex.axis, cex.lab = cex.lab)
     Axis(side = 2, at = seq(0, 1, by = 0.1), labels = seq(0,
     1, by = 0.1), cex.axis = cex.axis, cex.lab = cex.lab,
     font.lab = 2)
     if (!is.null(obs) & is.numeric(obs))
     abline(v = quantile.obs, lty = 3, col = "black",
     lwd = 2)
     abline(h = 0.5, lty = 2, col = "grey", lwd = 2)
     f <- approxfun(x.ecdf$ecdf, x.ecdf$x)
     quantile.sim <- f(0.5)
     abline(v = quantile.sim, lty = 3, col = "grey", lwd = 2)
     if (!is.null(obs) & is.numeric(obs)) {
     bias <- 100 * (quantile.sim - quantile.obs)/quantile.obs
     if (bias == 0)
     txt.col <- "green"
     if (bias < 0)
     txt.col <- "red"
     if (bias > 0)
     txt.col <- "blue"
     leg.txt <- c(paste(quantiles.labels[i], "obs= ",
     round(quantile.obs, 2)), paste(quantiles.labels[i],
     "sim= ", round(quantile.sim, 2)), paste("Bias=",
     round(bias, 1), "[%]", sep = " "))
     legend(leg.pos, legend = leg.txt, inset = 0.02,
     bty = "n", cex = leg.cex, text.col = c("black",
     "black", txt.col))
     }
     else {
     leg.txt <- paste(quantiles.labels[i], "sim= ",
     round(quantile.sim, 3))
     legend(leg.pos, legend = leg.txt, bty = "n",
     cex = leg.cex)
     }
     }
     }
     if (plot) {
     if (!is.null(main))
     mtext(main, side = 3, line = 1, cex = cex.main, outer = TRUE)
     }
     return(ecdf)
    }
    <bytecode: 0xb3cd778>
    <environment: namespace:hydroPSO>
     --- function search by body ---
    Function quant2ecdf.default in namespace hydroPSO has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (is.na(match(class(sim), c("matrix", "data.frame")))) stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')") :
     the condition has length > 1
    Calls: quant2ecdf -> quant2ecdf.matrix -> quant2ecdf.default
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.4-1
Check: examples
Result: ERROR
    Running examples in ‘hydroPSO-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: quant2ecdf
    > ### Title: Simulated Values -> Empirical CDFs
    > ### Aliases: quant2ecdf quant2ecdf.default quant2ecdf.matrix
    > ### quant2ecdf.data.frame
    > ### Keywords: math manip graph
    >
    > ### ** Examples
    >
    > # random matrix with 100 simulated values (in columns) corresponding to 10
    > # different behavioural parameter sets
    > x <- matrix(rnorm(1000), ncol=10, nrow=100)
    >
    > # empirical CDFs for the quantiles 0.05, 0.5 and 0.95, with equal weight for
    > # each parameter set
    > quant2ecdf(sim=x, weights=1:10, byrow=FALSE)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    hydroPSO
     --- call from context ---
    quant2ecdf.default(sim = sim, weights = weights, byrow = byrow,
     quantiles.desired = quantiles.desired, plot = plot, obs = obs,
     quantiles.labels = quantiles.labels, main = main, ylab = ylab,
     col = col, leg.cex = leg.cex, leg.pos = leg.pos, cex.axis = cex.axis,
     cex.main = cex.main, cex.lab = cex.lab, verbose = verbose,
     ...)
     --- call from argument ---
    if (is.na(match(class(sim), c("matrix", "data.frame")))) stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')")
     --- R stacktrace ---
    where 1: quant2ecdf.default(sim = sim, weights = weights, byrow = byrow,
     quantiles.desired = quantiles.desired, plot = plot, obs = obs,
     quantiles.labels = quantiles.labels, main = main, ylab = ylab,
     col = col, leg.cex = leg.cex, leg.pos = leg.pos, cex.axis = cex.axis,
     cex.main = cex.main, cex.lab = cex.lab, verbose = verbose,
     ...)
    where 2: quant2ecdf.matrix(sim = x, weights = 1:10, byrow = FALSE)
    where 3: quant2ecdf(sim = x, weights = 1:10, byrow = FALSE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (sim, weights = NULL, byrow = TRUE, quantiles.desired = c(0.05,
     0.5, 0.95), plot = TRUE, obs = NULL, quantiles.labels = c("Q5",
     "Q50", "Q95"), main = NULL, ylab = "Probability", col = "blue",
     leg.cex = 1.2, leg.pos = "bottomright", cex.axis = 1.2, cex.main = 1.2,
     cex.lab = 1.2, verbose = TRUE, ...)
    {
     if (is.na(match(class(sim), c("matrix", "data.frame"))))
     stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')")
     ifelse(byrow == TRUE, stg <- "ROW", stg <- "COLUMN")
     if (verbose)
     message("[ Computing un-weighted quantiles for each ",
     stg, " of 'sim' ... ]")
     q5.50.95 <- wquantile(sim, byrow = byrow, probs = quantiles.desired)
     nquantiles <- length(quantiles.desired)
     ecdf <- vector("list", nquantiles)
     if (plot) {
     old.par <- par(no.readonly = TRUE)
     par(mfrow = c(1, nquantiles))
     if (!is.null(main))
     par(oma = c(1, 1, 3, 0))
     }
     ifelse(is.null(weights), stg <- "the UN-weighted", stg <- "the weighted")
     for (i in 1:nquantiles) {
     if (verbose)
     message("[ Computing ", stg, " ECDF for quantile ",
     format(quantiles.desired[i], width = 5, justify = "left"),
     " , ", i, "/", nquantiles, "=>", format(round(100 *
     i/nquantiles, 2), width = 7, justify = "left"),
     "% ... ]")
     x.ecdf <- Hmisc::wtd.Ecdf(q5.50.95[, i], weights = weights,
     normwt = TRUE)
     ecdf[[i]] <- x.ecdf
     names(ecdf)[i] <- quantiles.labels[i]
     if (plot) {
     if (!is.null(obs) & is.numeric(obs)) {
     if (is.na(match(class(obs), c("zoo", "numeric",
     "integer"))))
     stop("Invalid argument: 'class(obs)' must be in c('zoo', 'numeric', 'integer')")
     quantile.obs <- quantile(as.numeric(obs), probs = quantiles.desired[i],
     na.rm = TRUE)
     }
     main.loc <- paste("Empirical CDF of", quantiles.labels[i],
     sep = " ")
     plot(x.ecdf$x, x.ecdf$ecdf, xlab = paste(quantiles.labels[i],
     "[m3/s]", sep = " "), col = col, yaxt = "n",
     type = "b", cex = 0.2, main = main.loc, ylab = ylab,
     cex.axis = cex.axis, cex.main = cex.main, cex.lab = cex.lab,
     font.lab = 2, ...)
     Axis(side = 2, at = seq(0, 1, by = 0.05), labels = FALSE,
     cex.axis = cex.axis, cex.lab = cex.lab)
     Axis(side = 2, at = seq(0, 1, by = 0.1), labels = seq(0,
     1, by = 0.1), cex.axis = cex.axis, cex.lab = cex.lab,
     font.lab = 2)
     if (!is.null(obs) & is.numeric(obs))
     abline(v = quantile.obs, lty = 3, col = "black",
     lwd = 2)
     abline(h = 0.5, lty = 2, col = "grey", lwd = 2)
     f <- approxfun(x.ecdf$ecdf, x.ecdf$x)
     quantile.sim <- f(0.5)
     abline(v = quantile.sim, lty = 3, col = "grey", lwd = 2)
     if (!is.null(obs) & is.numeric(obs)) {
     bias <- 100 * (quantile.sim - quantile.obs)/quantile.obs
     if (bias == 0)
     txt.col <- "green"
     if (bias < 0)
     txt.col <- "red"
     if (bias > 0)
     txt.col <- "blue"
     leg.txt <- c(paste(quantiles.labels[i], "obs= ",
     round(quantile.obs, 2)), paste(quantiles.labels[i],
     "sim= ", round(quantile.sim, 2)), paste("Bias=",
     round(bias, 1), "[%]", sep = " "))
     legend(leg.pos, legend = leg.txt, inset = 0.02,
     bty = "n", cex = leg.cex, text.col = c("black",
     "black", txt.col))
     }
     else {
     leg.txt <- paste(quantiles.labels[i], "sim= ",
     round(quantile.sim, 3))
     legend(leg.pos, legend = leg.txt, bty = "n",
     cex = leg.cex)
     }
     }
     }
     if (plot) {
     if (!is.null(main))
     mtext(main, side = 3, line = 1, cex = cex.main, outer = TRUE)
     }
     return(ecdf)
    }
    <bytecode: 0x55a6fc4bdef8>
    <environment: namespace:hydroPSO>
     --- function search by body ---
    Function quant2ecdf.default in namespace hydroPSO has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (is.na(match(class(sim), c("matrix", "data.frame")))) stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')") :
     the condition has length > 1
    Calls: quant2ecdf -> quant2ecdf.matrix -> quant2ecdf.default
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.4-1
Check: examples
Result: ERROR
    Running examples in ‘hydroPSO-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: quant2ecdf
    > ### Title: Simulated Values -> Empirical CDFs
    > ### Aliases: quant2ecdf quant2ecdf.default quant2ecdf.matrix
    > ### quant2ecdf.data.frame
    > ### Keywords: math manip graph
    >
    > ### ** Examples
    >
    > # random matrix with 100 simulated values (in columns) corresponding to 10
    > # different behavioural parameter sets
    > x <- matrix(rnorm(1000), ncol=10, nrow=100)
    >
    > # empirical CDFs for the quantiles 0.05, 0.5 and 0.95, with equal weight for
    > # each parameter set
    > quant2ecdf(sim=x, weights=1:10, byrow=FALSE)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    hydroPSO
     --- call from context ---
    quant2ecdf.default(sim = sim, weights = weights, byrow = byrow,
     quantiles.desired = quantiles.desired, plot = plot, obs = obs,
     quantiles.labels = quantiles.labels, main = main, ylab = ylab,
     col = col, leg.cex = leg.cex, leg.pos = leg.pos, cex.axis = cex.axis,
     cex.main = cex.main, cex.lab = cex.lab, verbose = verbose,
     ...)
     --- call from argument ---
    if (is.na(match(class(sim), c("matrix", "data.frame")))) stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')")
     --- R stacktrace ---
    where 1: quant2ecdf.default(sim = sim, weights = weights, byrow = byrow,
     quantiles.desired = quantiles.desired, plot = plot, obs = obs,
     quantiles.labels = quantiles.labels, main = main, ylab = ylab,
     col = col, leg.cex = leg.cex, leg.pos = leg.pos, cex.axis = cex.axis,
     cex.main = cex.main, cex.lab = cex.lab, verbose = verbose,
     ...)
    where 2: quant2ecdf.matrix(sim = x, weights = 1:10, byrow = FALSE)
    where 3: quant2ecdf(sim = x, weights = 1:10, byrow = FALSE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (sim, weights = NULL, byrow = TRUE, quantiles.desired = c(0.05,
     0.5, 0.95), plot = TRUE, obs = NULL, quantiles.labels = c("Q5",
     "Q50", "Q95"), main = NULL, ylab = "Probability", col = "blue",
     leg.cex = 1.2, leg.pos = "bottomright", cex.axis = 1.2, cex.main = 1.2,
     cex.lab = 1.2, verbose = TRUE, ...)
    {
     if (is.na(match(class(sim), c("matrix", "data.frame"))))
     stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')")
     ifelse(byrow == TRUE, stg <- "ROW", stg <- "COLUMN")
     if (verbose)
     message("[ Computing un-weighted quantiles for each ",
     stg, " of 'sim' ... ]")
     q5.50.95 <- wquantile(sim, byrow = byrow, probs = quantiles.desired)
     nquantiles <- length(quantiles.desired)
     ecdf <- vector("list", nquantiles)
     if (plot) {
     old.par <- par(no.readonly = TRUE)
     par(mfrow = c(1, nquantiles))
     if (!is.null(main))
     par(oma = c(1, 1, 3, 0))
     }
     ifelse(is.null(weights), stg <- "the UN-weighted", stg <- "the weighted")
     for (i in 1:nquantiles) {
     if (verbose)
     message("[ Computing ", stg, " ECDF for quantile ",
     format(quantiles.desired[i], width = 5, justify = "left"),
     " , ", i, "/", nquantiles, "=>", format(round(100 *
     i/nquantiles, 2), width = 7, justify = "left"),
     "% ... ]")
     x.ecdf <- Hmisc::wtd.Ecdf(q5.50.95[, i], weights = weights,
     normwt = TRUE)
     ecdf[[i]] <- x.ecdf
     names(ecdf)[i] <- quantiles.labels[i]
     if (plot) {
     if (!is.null(obs) & is.numeric(obs)) {
     if (is.na(match(class(obs), c("zoo", "numeric",
     "integer"))))
     stop("Invalid argument: 'class(obs)' must be in c('zoo', 'numeric', 'integer')")
     quantile.obs <- quantile(as.numeric(obs), probs = quantiles.desired[i],
     na.rm = TRUE)
     }
     main.loc <- paste("Empirical CDF of", quantiles.labels[i],
     sep = " ")
     plot(x.ecdf$x, x.ecdf$ecdf, xlab = paste(quantiles.labels[i],
     "[m3/s]", sep = " "), col = col, yaxt = "n",
     type = "b", cex = 0.2, main = main.loc, ylab = ylab,
     cex.axis = cex.axis, cex.main = cex.main, cex.lab = cex.lab,
     font.lab = 2, ...)
     Axis(side = 2, at = seq(0, 1, by = 0.05), labels = FALSE,
     cex.axis = cex.axis, cex.lab = cex.lab)
     Axis(side = 2, at = seq(0, 1, by = 0.1), labels = seq(0,
     1, by = 0.1), cex.axis = cex.axis, cex.lab = cex.lab,
     font.lab = 2)
     if (!is.null(obs) & is.numeric(obs))
     abline(v = quantile.obs, lty = 3, col = "black",
     lwd = 2)
     abline(h = 0.5, lty = 2, col = "grey", lwd = 2)
     f <- approxfun(x.ecdf$ecdf, x.ecdf$x)
     quantile.sim <- f(0.5)
     abline(v = quantile.sim, lty = 3, col = "grey", lwd = 2)
     if (!is.null(obs) & is.numeric(obs)) {
     bias <- 100 * (quantile.sim - quantile.obs)/quantile.obs
     if (bias == 0)
     txt.col <- "green"
     if (bias < 0)
     txt.col <- "red"
     if (bias > 0)
     txt.col <- "blue"
     leg.txt <- c(paste(quantiles.labels[i], "obs= ",
     round(quantile.obs, 2)), paste(quantiles.labels[i],
     "sim= ", round(quantile.sim, 2)), paste("Bias=",
     round(bias, 1), "[%]", sep = " "))
     legend(leg.pos, legend = leg.txt, inset = 0.02,
     bty = "n", cex = leg.cex, text.col = c("black",
     "black", txt.col))
     }
     else {
     leg.txt <- paste(quantiles.labels[i], "sim= ",
     round(quantile.sim, 3))
     legend(leg.pos, legend = leg.txt, bty = "n",
     cex = leg.cex)
     }
     }
     }
     if (plot) {
     if (!is.null(main))
     mtext(main, side = 3, line = 1, cex = cex.main, outer = TRUE)
     }
     return(ecdf)
    }
    <bytecode: 0xb4d0ad0>
    <environment: namespace:hydroPSO>
     --- function search by body ---
    Function quant2ecdf.default in namespace hydroPSO has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (is.na(match(class(sim), c("matrix", "data.frame")))) stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')") :
     the condition has length > 1
    Calls: quant2ecdf -> quant2ecdf.matrix -> quant2ecdf.default
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.4-1
Check: examples
Result: ERROR
    Running examples in ‘hydroPSO-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: quant2ecdf
    > ### Title: Simulated Values -> Empirical CDFs
    > ### Aliases: quant2ecdf quant2ecdf.default quant2ecdf.matrix
    > ### quant2ecdf.data.frame
    > ### Keywords: math manip graph
    >
    > ### ** Examples
    >
    > # random matrix with 100 simulated values (in columns) corresponding to 10
    > # different behavioural parameter sets
    > x <- matrix(rnorm(1000), ncol=10, nrow=100)
    >
    > # empirical CDFs for the quantiles 0.05, 0.5 and 0.95, with equal weight for
    > # each parameter set
    > quant2ecdf(sim=x, weights=1:10, byrow=FALSE)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    hydroPSO
     --- call from context ---
    quant2ecdf.default(sim = sim, weights = weights, byrow = byrow,
     quantiles.desired = quantiles.desired, plot = plot, obs = obs,
     quantiles.labels = quantiles.labels, main = main, ylab = ylab,
     col = col, leg.cex = leg.cex, leg.pos = leg.pos, cex.axis = cex.axis,
     cex.main = cex.main, cex.lab = cex.lab, verbose = verbose,
     ...)
     --- call from argument ---
    if (is.na(match(class(sim), c("matrix", "data.frame")))) stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')")
     --- R stacktrace ---
    where 1: quant2ecdf.default(sim = sim, weights = weights, byrow = byrow,
     quantiles.desired = quantiles.desired, plot = plot, obs = obs,
     quantiles.labels = quantiles.labels, main = main, ylab = ylab,
     col = col, leg.cex = leg.cex, leg.pos = leg.pos, cex.axis = cex.axis,
     cex.main = cex.main, cex.lab = cex.lab, verbose = verbose,
     ...)
    where 2: quant2ecdf.matrix(sim = x, weights = 1:10, byrow = FALSE)
    where 3: quant2ecdf(sim = x, weights = 1:10, byrow = FALSE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (sim, weights = NULL, byrow = TRUE, quantiles.desired = c(0.05,
     0.5, 0.95), plot = TRUE, obs = NULL, quantiles.labels = c("Q5",
     "Q50", "Q95"), main = NULL, ylab = "Probability", col = "blue",
     leg.cex = 1.2, leg.pos = "bottomright", cex.axis = 1.2, cex.main = 1.2,
     cex.lab = 1.2, verbose = TRUE, ...)
    {
     if (is.na(match(class(sim), c("matrix", "data.frame"))))
     stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')")
     ifelse(byrow == TRUE, stg <- "ROW", stg <- "COLUMN")
     if (verbose)
     message("[ Computing un-weighted quantiles for each ",
     stg, " of 'sim' ... ]")
     q5.50.95 <- wquantile(sim, byrow = byrow, probs = quantiles.desired)
     nquantiles <- length(quantiles.desired)
     ecdf <- vector("list", nquantiles)
     if (plot) {
     old.par <- par(no.readonly = TRUE)
     par(mfrow = c(1, nquantiles))
     if (!is.null(main))
     par(oma = c(1, 1, 3, 0))
     }
     ifelse(is.null(weights), stg <- "the UN-weighted", stg <- "the weighted")
     for (i in 1:nquantiles) {
     if (verbose)
     message("[ Computing ", stg, " ECDF for quantile ",
     format(quantiles.desired[i], width = 5, justify = "left"),
     " , ", i, "/", nquantiles, "=>", format(round(100 *
     i/nquantiles, 2), width = 7, justify = "left"),
     "% ... ]")
     x.ecdf <- Hmisc::wtd.Ecdf(q5.50.95[, i], weights = weights,
     normwt = TRUE)
     ecdf[[i]] <- x.ecdf
     names(ecdf)[i] <- quantiles.labels[i]
     if (plot) {
     if (!is.null(obs) & is.numeric(obs)) {
     if (is.na(match(class(obs), c("zoo", "numeric",
     "integer"))))
     stop("Invalid argument: 'class(obs)' must be in c('zoo', 'numeric', 'integer')")
     quantile.obs <- quantile(as.numeric(obs), probs = quantiles.desired[i],
     na.rm = TRUE)
     }
     main.loc <- paste("Empirical CDF of", quantiles.labels[i],
     sep = " ")
     plot(x.ecdf$x, x.ecdf$ecdf, xlab = paste(quantiles.labels[i],
     "[m3/s]", sep = " "), col = col, yaxt = "n",
     type = "b", cex = 0.2, main = main.loc, ylab = ylab,
     cex.axis = cex.axis, cex.main = cex.main, cex.lab = cex.lab,
     font.lab = 2, ...)
     Axis(side = 2, at = seq(0, 1, by = 0.05), labels = FALSE,
     cex.axis = cex.axis, cex.lab = cex.lab)
     Axis(side = 2, at = seq(0, 1, by = 0.1), labels = seq(0,
     1, by = 0.1), cex.axis = cex.axis, cex.lab = cex.lab,
     font.lab = 2)
     if (!is.null(obs) & is.numeric(obs))
     abline(v = quantile.obs, lty = 3, col = "black",
     lwd = 2)
     abline(h = 0.5, lty = 2, col = "grey", lwd = 2)
     f <- approxfun(x.ecdf$ecdf, x.ecdf$x)
     quantile.sim <- f(0.5)
     abline(v = quantile.sim, lty = 3, col = "grey", lwd = 2)
     if (!is.null(obs) & is.numeric(obs)) {
     bias <- 100 * (quantile.sim - quantile.obs)/quantile.obs
     if (bias == 0)
     txt.col <- "green"
     if (bias < 0)
     txt.col <- "red"
     if (bias > 0)
     txt.col <- "blue"
     leg.txt <- c(paste(quantiles.labels[i], "obs= ",
     round(quantile.obs, 2)), paste(quantiles.labels[i],
     "sim= ", round(quantile.sim, 2)), paste("Bias=",
     round(bias, 1), "[%]", sep = " "))
     legend(leg.pos, legend = leg.txt, inset = 0.02,
     bty = "n", cex = leg.cex, text.col = c("black",
     "black", txt.col))
     }
     else {
     leg.txt <- paste(quantiles.labels[i], "sim= ",
     round(quantile.sim, 3))
     legend(leg.pos, legend = leg.txt, bty = "n",
     cex = leg.cex)
     }
     }
     }
     if (plot) {
     if (!is.null(main))
     mtext(main, side = 3, line = 1, cex = cex.main, outer = TRUE)
     }
     return(ecdf)
    }
    <bytecode: 0xab6d6c0>
    <environment: namespace:hydroPSO>
     --- function search by body ---
    Function quant2ecdf.default in namespace hydroPSO has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (is.na(match(class(sim), c("matrix", "data.frame")))) stop("Invalid argument: 'class(sim)' must be in c('matrix', 'data.frame')") :
     the condition has length > 1
    Calls: quant2ecdf -> quant2ecdf.matrix -> quant2ecdf.default
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc