Utilities for community abundances (objects of class "abundances").

abd_species(abundances, check_arguments = TRUE)

abd_sum(abundances, as_numeric = FALSE, check_arguments = TRUE)

prob_species(species_distribution, check_arguments = TRUE)

Arguments

abundances

An object of class abundances.

check_arguments

If TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

as_numeric

If TRUE, a number or a numeric vector is returned rather than a tibble.

species_distribution

An object of class species_distribution.

Details

abd_species() returns a tibble containing the species abundance columns only, to simplify numeric operations. prob_species() returns the same tibble but values are probabilities.

abd_sum() returns the sample sizes of the communities.

Examples

abd_species(paracou_6_abd)
#> # A tibble: 4 × 335
#>   Abarema_jupunba Abarema_mataybifolia Amaioua_guianensis Amanoa_congesta
#>             <int>                <int>              <int>           <int>
#> 1               2                    2                  1               1
#> 2               2                    0                  1               0
#> 3               2                    2                  0               0
#> 4               4                    0                  0               0
#> # ℹ 331 more variables: Amanoa_guianensis <int>, Ambelania_acida <int>,
#> #   Amphirrhox_longifolia <int>, Andira_coriacea <int>, Apeiba_glabra <int>,
#> #   Aspidosperma_album <int>, Aspidosperma_cruentum <int>,
#> #   Aspidosperma_excelsum <int>, Bocoa_prouacensis <int>,
#> #   Brosimum_guianense <int>, Brosimum_rubescens <int>, Brosimum_utile <int>,
#> #   Carapa_surinamensis <int>, Caryocar_glabrum <int>, Casearia_decandra <int>,
#> #   Casearia_javitensis <int>, Catostemma_fragrans <int>, …
abd_sum(paracou_6_abd)
#> # A tibble: 4 × 3
#>   site      weight abundance
#>   <chr>      <dbl>     <dbl>
#> 1 subplot_1   1.56       942
#> 2 subplot_2   1.56       872
#> 3 subplot_3   1.56       929
#> 4 subplot_4   1.56       798