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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: doMetacomMetacom
> ### Title: Performs a metacomunity analysis.
> ### Aliases: doMetacomMetacom
> 
> ### ** Examples
> 
> data("loremIpsum")
> loremIpsum01 <- loremIpsum[1:100]
> loremIpsum02 <- loremIpsum[101:200]
> loremIpsum03 <- loremIpsum[201:300]
> loremIpsum04 <- loremIpsum[301:400]
> loremIpsum05 <- loremIpsum[401:500]
> subDir <- "RESULTS"
> dir.create(file.path(getwd(), subDir), showWarnings = FALSE)
> write(x = loremIpsum01, file = "RESULTS/loremIpsum01.txt")
> write(x = loremIpsum02, file = "RESULTS/loremIpsum02.txt")
> write(x = loremIpsum03, file = "RESULTS/loremIpsum03.txt")
> write(x = loremIpsum04, file = "RESULTS/loremIpsum04.txt")
> write(x = loremIpsum05, file = "RESULTS/loremIpsum05.txt")
> wordOccuDF <- getwordOccuDF(mywd = paste0(getwd(), "/RESULTS"), 
+   excludeSW = FALSE)
Warning in readChar(zz, file.info(filetxt)$size) :
  text connection used with readChar(), results may be incorrect
Warning in tm_map.SimpleCorpus(corpus, tm::removePunctuation) :
  transformation drops documents
Warning in readChar(zz, file.info(filetxt)$size) :
  text connection used with readChar(), results may be incorrect
Warning in tm_map.SimpleCorpus(corpus, tm::removePunctuation) :
  transformation drops documents
Warning in readChar(zz, file.info(filetxt)$size) :
  text connection used with readChar(), results may be incorrect
Warning in tm_map.SimpleCorpus(corpus, tm::removePunctuation) :
  transformation drops documents
Warning in readChar(zz, file.info(filetxt)$size) :
  text connection used with readChar(), results may be incorrect
Warning in tm_map.SimpleCorpus(corpus, tm::removePunctuation) :
  transformation drops documents
Warning in readChar(zz, file.info(filetxt)$size) :
  text connection used with readChar(), results may be incorrect
Warning in tm_map.SimpleCorpus(corpus, tm::removePunctuation) :
  transformation drops documents
> file.remove(list.files(full.names = TRUE, 
+   path = paste0(getwd(), "/RESULTS"), pattern = "loremIpsum"))
[1] TRUE TRUE TRUE TRUE TRUE
> doMetacomMetacom(wordF = wordOccuDF)
Loading required package: metacom
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-2
Warning in IdentifyStructure(metaCom) : NAs introduced by coercion
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
inpdfr
 --- call from context --- 
IdentifyStructure(metaCom)
 --- call from argument --- 
if (as.numeric(t(metacom.obj$Coherence)[, 3]) >= 0.05) "Random" else if (as.numeric(t(metacom.obj$Coherence)[, 
    1]) < as.numeric(t(metacom.obj$Coherence)[, 4]) & as.numeric(t(metacom.obj$Coherence)[, 
    3]) < 0.05) "Checkerboard (negative coherence)" else if (as.numeric(t(metacom.obj$Coherence)[, 
    1]) >= as.numeric(t(metacom.obj$Coherence)[, 4]) & as.numeric(t(metacom.obj$Coherence)[, 
    3]) < 0.05) {
    print("Positive coherence...")
    if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 0.05 & 
        metacom.obj$Boundary[, 1] >= 0 & metacom.obj$Boundary[, 
        2] < 0.05) 
        "Clementsian"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 0.05 & 
        metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
        2] >= 0.05) 
        "Gleasonian"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 0.05 & 
        metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
        2] < 0.05) 
        "Evenly spaced"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 0.05 & 
        metacom.obj$Boundary[, 1] >= 0 & metacom.obj$Boundary[, 
        2] < 0.05) 
        "Nested (clumped)"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 0.05 & 
        metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
        2] >= 0.05) 
        "Nested (random)"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 0.05 & 
        metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
        2] < 0.05) 
        "Nested (hyperdispersed"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 0.05 & 
        metacom.obj$Boundary[, 1] >= 0 & metacom.obj$Boundary[, 
        2] < 0.05) 
        "Quasi-clementsian"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 0.05 & 
        metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
        2] >= 0.05) 
        "Quasi-gleasonian"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 0.05 & 
        metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
        2] < 0.05) 
        "Quasi-evenly spaced"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 0.05 & 
        metacom.obj$Boundary[, 1] >= 0 & metacom.obj$Boundary[, 
        2] < 0.05) 
        "Quasi-nested (clumped)"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 0.05 & 
        metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
        2] >= 0.05) 
        "Quasi-nested (random)"
    else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
        4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 0.05 & 
        metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
        2] < 0.05) 
        "Quasi-nested (hyperdispersed)"
}
 --- R stacktrace ---
where 1: IdentifyStructure(metaCom)
where 2: print(IdentifyStructure(metaCom))
where 3: doTryCatch(return(expr), name, parentenv, handler)
where 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 5: tryCatchList(expr, classes, parentenv, handlers)
where 6: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 7: try(print(IdentifyStructure(metaCom)), silent = TRUE)
where 8: doMetacomMetacom(wordF = wordOccuDF)

 --- value of length: 2 type: logical ---
[1]    NA FALSE
 --- function from context --- 
function (metacom.obj) 
{
    if (as.numeric(t(metacom.obj$Coherence)[, 3]) >= 0.05) 
        "Random"
    else if (as.numeric(t(metacom.obj$Coherence)[, 1]) < as.numeric(t(metacom.obj$Coherence)[, 
        4]) & as.numeric(t(metacom.obj$Coherence)[, 3]) < 0.05) 
        "Checkerboard (negative coherence)"
    else if (as.numeric(t(metacom.obj$Coherence)[, 1]) >= as.numeric(t(metacom.obj$Coherence)[, 
        4]) & as.numeric(t(metacom.obj$Coherence)[, 3]) < 0.05) {
        print("Positive coherence...")
        if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= as.numeric(t(metacom.obj$Turnover)[, 
            4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 
            0.05 & metacom.obj$Boundary[, 1] >= 0 & metacom.obj$Boundary[, 
            2] < 0.05) 
            "Clementsian"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= 
            as.numeric(t(metacom.obj$Turnover)[, 4]) & as.numeric(t(metacom.obj$Turnover)[, 
            3]) <= 0.05 & metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
            2] >= 0.05) 
            "Gleasonian"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= 
            as.numeric(t(metacom.obj$Turnover)[, 4]) & as.numeric(t(metacom.obj$Turnover)[, 
            3]) <= 0.05 & metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
            2] < 0.05) 
            "Evenly spaced"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
            4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 
            0.05 & metacom.obj$Boundary[, 1] >= 0 & metacom.obj$Boundary[, 
            2] < 0.05) 
            "Nested (clumped)"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
            4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 
            0.05 & metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
            2] >= 0.05) 
            "Nested (random)"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
            4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) <= 
            0.05 & metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
            2] < 0.05) 
            "Nested (hyperdispersed"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= 
            as.numeric(t(metacom.obj$Turnover)[, 4]) & as.numeric(t(metacom.obj$Turnover)[, 
            3]) > 0.05 & metacom.obj$Boundary[, 1] >= 0 & metacom.obj$Boundary[, 
            2] < 0.05) 
            "Quasi-clementsian"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= 
            as.numeric(t(metacom.obj$Turnover)[, 4]) & as.numeric(t(metacom.obj$Turnover)[, 
            3]) > 0.05 & metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
            2] >= 0.05) 
            "Quasi-gleasonian"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) >= 
            as.numeric(t(metacom.obj$Turnover)[, 4]) & as.numeric(t(metacom.obj$Turnover)[, 
            3]) > 0.05 & metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
            2] < 0.05) 
            "Quasi-evenly spaced"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
            4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 
            0.05 & metacom.obj$Boundary[, 1] >= 0 & metacom.obj$Boundary[, 
            2] < 0.05) 
            "Quasi-nested (clumped)"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
            4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 
            0.05 & metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
            2] >= 0.05) 
            "Quasi-nested (random)"
        else if (as.numeric(t(metacom.obj$Turnover)[, 1]) < as.numeric(t(metacom.obj$Turnover)[, 
            4]) & as.numeric(t(metacom.obj$Turnover)[, 3]) > 
            0.05 & metacom.obj$Boundary[, 1] < 0 & metacom.obj$Boundary[, 
            2] < 0.05) 
            "Quasi-nested (hyperdispersed)"
    }
}
<bytecode: 0x55b8e23a51d8>
<environment: namespace:inpdfr>
 --- function search by body ---
Function IdentifyStructure in namespace inpdfr has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1