
Get Relative Abundance Index (RAI) based on the sum of individual counts
Source:R/get_rai.R
get_rai_individuals.RdArguments
- x
Camera trap data package object, as returned by
camtrapdp::read_camtrapdp().- ...
filter predicates for filtering on deployments are not supported anymore and an error is returned. Anything else throws a deprecation warning and will be ignored. Please use
filter_deployments()to filter on deployments.- species
Character with scientific names. Common names are not supported anymore as of camtraptor 1.0.0. Please, check
filter_observations()to know how to filter byscientificName. If"all"(default) all scientific names are automatically selected. IfNULLall observations of all species are taken into account.- sex
Character defining the sex class to filter on, e.g.
"female"orc("male", "unknown"). IfNULL(default) all observations of all sex classes are taken into account. Please, checkfilter_observations()to know how to filter bysex.- life_stage
Character vector defining the life stage class to filter on, e.g.
"adult"orc("subadult", "adult"). IfNULL(default) all observations of all life stage classes are taken into account. Please, checkfilter_observations()to know how to filter bylifeStage.
Value
A tibble data frame with the following columns:
deploymentID: Deployment unique identifier.scientificName: Scientific name.rai: Relative abundance index.
Details
Gets the RAI (Relative Abundance Index) per deployment. The RAI is normalized
using 100 days deployment activity. In other words: RAI = 100 * (n/effort)
where n is the sum of individual counts related to event-based observations
and effort is the effort duration in days.
It is deprecated as of camtraptor 1.0.0. Please use
summarize_observations() instead.
See also
Other deprecated exploration functions:
get_custom_effort(),
get_effort(),
get_n_individuals(),
get_n_obs(),
get_n_species(),
get_rai()
Examples
x <- example_dataset()
# Calculate RAI based on number of individuals
get_rai_individuals(x) # species = "all" by default, so equivalent of
#> Warning: `get_rai_individuals()` was deprecated in camtraptor 1.0.0.
#> ℹ Please use `summarize_observations(x, group_by = c("deploymentID",
#> "latitude"), "longitude"), "scientificName")` instead.
#> ℹ The deprecated feature was likely used in the camtraptor package.
#> Please report the issue at <https://github.com/inbo/camtraptor/issues>.
#> # A tibble: 15 × 3
#> # Groups: deploymentID, scientificName [15]
#> deploymentID scientificName rai
#> <chr> <chr> <dbl>
#> 1 00a2c20d Anas platyrhynchos 71.3
#> 2 00a2c20d Ardea cinerea 3.10
#> 3 00a2c20d Rattus norvegicus 6.20
#> 4 00a2c20d NA 0
#> 5 29b7d356 Anas platyrhynchos 171.
#> 6 29b7d356 Anas strepera 40.2
#> 7 29b7d356 Aves 10.0
#> 8 29b7d356 NA 0
#> 9 577b543a Martes foina 11.0
#> 10 577b543a Mustela putorius 32.9
#> 11 577b543a Vulpes vulpes 11.0
#> 12 577b543a NA 0
#> 13 62c200a9 Ardea 9.08
#> 14 62c200a9 Aves 4.54
#> 15 62c200a9 NA 0
get_rai_individuals(x, species = "all")
#> # A tibble: 15 × 3
#> # Groups: deploymentID, scientificName [15]
#> deploymentID scientificName rai
#> <chr> <chr> <dbl>
#> 1 00a2c20d Anas platyrhynchos 71.3
#> 2 00a2c20d Ardea cinerea 3.10
#> 3 00a2c20d Rattus norvegicus 6.20
#> 4 00a2c20d NA 0
#> 5 29b7d356 Anas platyrhynchos 171.
#> 6 29b7d356 Anas strepera 40.2
#> 7 29b7d356 Aves 10.0
#> 8 29b7d356 NA 0
#> 9 577b543a Martes foina 11.0
#> 10 577b543a Mustela putorius 32.9
#> 11 577b543a Vulpes vulpes 11.0
#> 12 577b543a NA 0
#> 13 62c200a9 Ardea 9.08
#> 14 62c200a9 Aves 4.54
#> 15 62c200a9 NA 0
# Selected species
get_rai_individuals(
x,
species = c("Anas platyrhynchos", "Martes foina")
)
#> Warning: The `species` argument of `get_rai_individuals()` is deprecated as of
#> camtraptor 1.0.0.
#> ℹ Argument `species` is deprecated as of camtraptor 1.0.0. Please, use
#> `filter_observations()` to filter by `scientificName`.
#> ℹ The deprecated feature was likely used in the camtraptor package.
#> Please report the issue at <https://github.com/inbo/camtraptor/issues>.
#> # A tibble: 3 × 3
#> # Groups: deploymentID, scientificName [3]
#> deploymentID scientificName rai
#> <chr> <chr> <dbl>
#> 1 00a2c20d Anas platyrhynchos 71.3
#> 2 29b7d356 Anas platyrhynchos 171.
#> 3 577b543a Martes foina 11.0