This function is deprecated. Use summarize_observations() instead.
Gets the number of event-based observations per deployment.
Arguments
- 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 of the species. This column is omitted if parameterspecies = NULL.n: Number of observations.
See also
Other deprecated exploration functions:
get_custom_effort(),
get_effort(),
get_n_individuals(),
get_n_species(),
get_rai(),
get_rai_individuals()
Examples
x <- example_dataset()
# Get number of observations for each species
get_n_obs(x)
#> Warning: `get_n_obs()` 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 n
#> <chr> <chr> <int>
#> 1 00a2c20d Anas platyrhynchos 9
#> 2 00a2c20d Ardea cinerea 1
#> 3 00a2c20d Rattus norvegicus 2
#> 4 00a2c20d NA 2
#> 5 29b7d356 Anas platyrhynchos 6
#> 6 29b7d356 Anas strepera 2
#> 7 29b7d356 Aves 1
#> 8 29b7d356 NA 2
#> 9 577b543a Martes foina 1
#> 10 577b543a Mustela putorius 3
#> 11 577b543a Vulpes vulpes 1
#> 12 577b543a NA 1
#> 13 62c200a9 Ardea 2
#> 14 62c200a9 Aves 1
#> 15 62c200a9 NA 2
# Get number of obs of all species, not identified individuals as well
get_n_obs(x, species = NULL)
#> # A tibble: 4 × 2
#> # Groups: deploymentID [4]
#> deploymentID n
#> <chr> <int>
#> 1 00a2c20d 14
#> 2 29b7d356 11
#> 3 577b543a 6
#> 4 62c200a9 5
# Get number of observations of Anas platyrhynchos
get_n_obs(x, species = "Anas platyrhynchos")
#> Warning: The `species` argument of `get_n_obs()` 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: 2 × 3
#> # Groups: deploymentID, scientificName [2]
#> deploymentID scientificName n
#> <chr> <chr> <int>
#> 1 00a2c20d Anas platyrhynchos 9
#> 2 29b7d356 Anas platyrhynchos 6
# Specify sex
get_n_obs(x, sex = "female")
#> Warning: The `sex` argument of `get_n_obs()` is deprecated as of camtraptor 1.0.0.
#> ℹ Argument `sex` is deprecated as of camtraptor 1.0.0. Please, use
#> `filter_observations()` to filter by `sex`.
#> ℹ The deprecated feature was likely used in the camtraptor package.
#> Please report the issue at <https://github.com/inbo/camtraptor/issues>.
#> # A tibble: 2 × 3
#> # Groups: deploymentID, scientificName [2]
#> deploymentID scientificName n
#> <chr> <chr> <int>
#> 1 00a2c20d Anas platyrhynchos 4
#> 2 29b7d356 Anas platyrhynchos 3
# Specify life stage
get_n_obs(x, life_stage = c("subadult", "adult"))
#> Warning: The `life_stage` argument of `get_n_obs()` is deprecated as of camtraptor
#> 1.0.0.
#> ℹ Argument `life_stage` is deprecated as of camtraptor 1.0.0. Please, use
#> `filter_observations()` to filter by `lifeStage`.
#> ℹ The deprecated feature was likely used in the camtraptor package.
#> Please report the issue at <https://github.com/inbo/camtraptor/issues>.
#> # A tibble: 7 × 3
#> # Groups: deploymentID, scientificName [7]
#> deploymentID scientificName n
#> <chr> <chr> <int>
#> 1 00a2c20d Anas platyrhynchos 7
#> 2 00a2c20d Ardea cinerea 1
#> 3 29b7d356 Anas platyrhynchos 6
#> 4 29b7d356 Anas strepera 2
#> 5 577b543a Martes foina 1
#> 6 577b543a Mustela putorius 3
#> 7 577b543a Vulpes vulpes 1
