Running examples in 'iNextPD-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: SPBoot
> ### Title: Estimation of species relative abundance or detection
> ###   probability distribution
> ### Aliases: SPBoot
> 
> ### ** Examples
> 
> data(bird)
> bird.inc <- bird$inci
> SPBoot(bird$abun, datatype="abundance")
$North.site
           Acanthiza_pusilla         Rhipidura_albicollis 
                 0.202970297                  0.089108910 
     Pachycephala_pectoralis          Zosterops_lateralis 
                 0.079207914                  0.079207914 
        Pardalotus_punctatus               Gerygone_mouki 
                 0.074257406                  0.059405543 
       Cormobates_leucophaea            Meliphaga_lewinii 
                 0.054454394                  0.054454394 
      Menura_novaehollandiae          Rhipidura_rufifrons 
                 0.044547402                  0.039586152 
         Psophodes_olivaceus    Cacomantis_flabelliformis 
                 0.034609444                  0.024505461 
        Eopsaltria_australis     Calyptorhynchus_funereus 
                 0.024505461                  0.019252435 
     Colluricincla_harmonica         Alisterus_scapularis 
                 0.019252435                  0.013711189 
          Strepera_graculina          Dacelo_novaeguineae 
                 0.013711189                  0.007808497 
         Platycercus_elegans    Ptilonorhynchus_violaceus 
                 0.007808497                  0.007808497 
        Sericornis_frontalis                              
                 0.007808497                  0.005901447 
                                                          
                 0.005901447                  0.005901447 
                                                          
                 0.005901447                  0.005901447 
            Cacatua_galerita            Corvus_coronoides 
                 0.002085140                  0.002085140 
     Leucosarcia_melanoleuca          Monarcha_melanopsis 
                 0.002085140                  0.002085140 
          Oriolus_sagittatus               Petroica_rosea 
                 0.002085140                  0.002085140 
           Acanthiza_lineata               Acanthiza_nana 
                 0.000000000                  0.000000000 
Acanthorhynchus_tenuirostris       Lichenostomus_chrysops 
                 0.000000000                  0.000000000 
             Malurus_cyaneus             Malurus_lamberti 
                 0.000000000                  0.000000000 
        Manorina_melanophrys          Neochmia_temporalis 
                 0.000000000                  0.000000000 
       Pachycephala_olivacea     Pachycephala_rufiventris 
                 0.000000000                  0.000000000 
          Phylidonyris_niger          Ptiloris_paradiseus 
                 0.000000000                  0.000000000 
    Sericornis_citreogularis            Zoothera_lunulata 
                 0.000000000                  0.000000000 

$South.site
       Cormobates_leucophaea            Acanthiza_pusilla 
                 0.104234528                  0.100977199 
        Rhipidura_albicollis               Acanthiza_nana 
                 0.065146580                  0.058631921 
           Meliphaga_lewinii         Pardalotus_punctatus 
                 0.058631921                  0.055374591 
         Zosterops_lateralis      Pachycephala_pectoralis 
                 0.055374591                  0.048859923 
         Rhipidura_rufifrons               Gerygone_mouki 
                 0.045602574                  0.032571812 
         Monarcha_melanopsis         Manorina_melanophrys 
                 0.032571812                  0.029312227 
         Neochmia_temporalis          Platycercus_elegans 
                 0.029312227                  0.022778664 
         Psophodes_olivaceus      Colluricincla_harmonica 
                 0.022778664                  0.019490072 
             Malurus_cyaneus             Malurus_lamberti 
                 0.019490072                  0.019490072 
        Sericornis_frontalis    Cacomantis_flabelliformis 
                 0.019490072                  0.016162296 
        Eopsaltria_australis       Menura_novaehollandiae 
                 0.016162296                  0.016162296 
      Lichenostomus_chrysops           Strepera_graculina 
                 0.012754851                  0.012754851 
           Acanthiza_lineata     Pachycephala_rufiventris 
                 0.009205941                  0.009205941 
         Ptiloris_paradiseus Acanthorhynchus_tenuirostris 
                 0.009205941                  0.005480418 
            Cacatua_galerita        Pachycephala_olivacea 
                 0.005480418                  0.005480418 
          Phylidonyris_niger    Ptilonorhynchus_violaceus 
                 0.005480418                  0.005480418 
    Sericornis_citreogularis                              
                 0.005480418                  0.005386634 
                                                          
                 0.005386634                  0.005386634 
        Alisterus_scapularis     Calyptorhynchus_funereus 
                 0.001844732                  0.001844732 
     Leucosarcia_melanoleuca               Petroica_rosea 
                 0.001844732                  0.001844732 
           Zoothera_lunulata            Corvus_coronoides 
                 0.001844732                  0.000000000 
         Dacelo_novaeguineae           Oriolus_sagittatus 
                 0.000000000                  0.000000000 

> SPBoot(bird$inci, datatype="incidence_raw")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
iNextPD
 --- call from context --- 
as.incfreq(x)
 --- call from argument --- 
if (class(x) == "data.frame" | class(x) == "matrix") {
    a <- sort(unique(c(unlist(x))))
    if (!identical(a, c(0, 1))) {
        warning("Invalid data type, the element of species by sites presence-absence matrix should be 0 or 1. Set nonzero elements as 1.")
        x <- (x > 0)
    }
    nT <- ncol(x)
    y <- rowSums(x)
    y <- c(nT, y)
    y
} else if (class(x) == "numeric" | class(x) == "integer" | class(x) == 
    "double") {
    warnings("Ambiguous data type, the input object is a vector. Set total number of sampling units as 1.")
    c(1, x)
} else {
    stop("Invalid data type, it should be a data.frame or matrix.")
}
 --- R stacktrace ---
where 1: as.incfreq(x)
where 2: SPBoot_(x, datatype)
where 3: FUN(X[[i]], ...)
where 4: lapply(x, function(x) SPBoot_(x, datatype))
where 5: SPBoot(bird$inci, datatype = "incidence_raw")

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (x) 
{
    if (class(x) == "data.frame" | class(x) == "matrix") {
        a <- sort(unique(c(unlist(x))))
        if (!identical(a, c(0, 1))) {
            warning("Invalid data type, the element of species by sites presence-absence matrix should be 0 or 1. Set nonzero elements as 1.")
            x <- (x > 0)
        }
        nT <- ncol(x)
        y <- rowSums(x)
        y <- c(nT, y)
        y
    }
    else if (class(x) == "numeric" | class(x) == "integer" | 
        class(x) == "double") {
        warnings("Ambiguous data type, the input object is a vector. Set total number of sampling units as 1.")
        c(1, x)
    }
    else {
        stop("Invalid data type, it should be a data.frame or matrix.")
    }
}
<bytecode: 0x62123d8>
<environment: namespace:iNextPD>
 --- function search by body ---
Function as.incfreq in namespace iNextPD has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1