Running examples in ‘fitteR-Ex.R’ failed
The error most likely occurred in:

> ### Name: fitter
> ### Title: Fit distributions to empirical data
> ### Aliases: fitter
> 
> ### ** Examples
> 
> # continous empirical data
> x <- rnorm(1000, 50, 3)
> if(requireNamespace("ExtDist")){
+ r <- fitter(x, dom="c", posList=list(stats=c("dexp"), ExtDist=c("dCauchy")))
+ }else{
+ r <- fitter(x, dom="c", posList=list(stats=c("dexp", "dt")))
+ }
Loading required namespace: ExtDist
Fitting ‘stats::dexp’
Reporting ‘stats::dexp’
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
fitteR
 --- call from context --- 
.gof(x, dst, fit[1:nargs], package = Package, R = M, method = m, 
    cdf = foo)
 --- call from argument --- 
if (!class(a) == "htest") {
    a <- NULL
}
 --- R stacktrace ---
where 1: .gof(x, dst, fit[1:nargs], package = Package, R = M, method = m, 
    cdf = foo)
where 2: fit2report(x = X, fits, Package, substring(dst, 2), meta)
where 3: fitter(x, dom = "c", posList = list(stats = c("dexp"), ExtDist = c("dCauchy")))

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (x, distr, param, package = NULL, R = 100, method = "", 
    cdf) 
{
    param <- as.list(param)
    x <- sort(x)
    N <- length(x)
    gof2htest <- function(tname, distr, score, p.value) {
        method <- gsub(tname, pattern = "\\.", replacement = " ")
        method <- paste0(method, " Test for ", sQuote(distr))
        gof <- list(p.value = as.numeric(p.value), statistic = setNames(score, 
            tname), method = method)
        class(gof) <- "htest"
        return(gof)
    }
    do.cdf <- function(cdf, v, param, lower.tail = TRUE, log.p = TRUE) {
        a <- try(do.call(cdf, c(list(v, log.p = log.p, lower.tail = lower.tail), 
            param)), silent = TRUE)
        if (!is.numeric(a)) {
            a <- NA
        }
        return(a)
    }
    if (method %in% c("shapiro.wilks", "sw")) {
        return(shapiro.test(x))
    }
    if (method == "ks") {
        a <- try(do.call("ks.test", c(list(x = x, y = cdf), param)))
        if (!class(a) == "htest") {
            a <- NULL
        }
        return(a)
    }
    do.boot <- function(x) {
        M <- c()
        if (is.matrix(R)) {
            M <- R
            R <- ncol(R)
        }
        else {
            M <- do.call("cbind", lapply(1:R, function(r) {
                sample(x, N, replace = TRUE)
            }))
        }
        H <- numeric(R)
        for (r in 1:R) {
            H[r] <- calc_score(M[, r])
        }
        return(H)
    }
    score <- p.value <- NA
    calc_S <- calc_score <- NULL
    if (method %in% c("anderson.darling", "ad")) {
        calc_S <- function(x) {
            S <- (2 * (1:N) - 1)/N * (do.cdf(cdf, x[1:N], param) + 
                do.cdf(cdf, x[N + 1 - (1:N)], param, FALSE))
            return(sum(S, na.rm = TRUE))
        }
        calc_score <- function(x) {
            (-N - calc_S(x))
        }
    }
    if (method == "cvm") {
        calc_S <- function(x) {
            S <- ((2 * (1:N) - 1)/(2 * N) - do.cdf(cdf, x[1:N], 
                param, lower.tail = FALSE, log.p = FALSE))^2
            return(sum(S, na.rm = TRUE))
        }
        calc_score <- function(x) {
            1/(12 * N) + calc_S(x)
        }
    }
    if (method == "watson") {
        calc_S <- function(x) {
            S <- ((2 * (1:N) - 1)/(2 * N) - do.cdf(cdf, x[1:N], 
                param, lower.tail = FALSE, log.p = FALSE))^2
            return(sum(S, na.rm = TRUE))
        }
        calc_score <- function(x) {
            1/(12 * N) + calc_S(x) - N * (mean(do.cdf(cdf, x, 
                param, lower.tail = FALSE, log.p = FALSE), na.rm = TRUE) - 
                0.5)^2
        }
    }
    score <- calc_score(x)
    H <- do.boot(x)
    p.value <- sum(H > score)/ifelse(is.matrix(R), ncol(R), R)
    gof <- gof2htest(method, distr, score, p.value)
    return(gof)
}
<bytecode: 0x69ffd48>
<environment: namespace:fitteR>
 --- function search by body ---
Function .gof in namespace fitteR has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (!class(a) == "htest") { : the condition has length > 1
Calls: fitter -> fit2report -> .gof
Execution halted