View source: R/select_factor_count_strictly_positive.R
select_factor_count_strictly_positive | R Documentation |
Presences have Count > 0
.
select_factor_count_strictly_positive(
observation,
variable,
threshold,
relative = FALSE,
dimension = 1
)
observation |
the |
variable |
the name of the |
threshold |
the minimal threshold |
relative |
When |
dimension |
Indicates which element of |
observation <- data.frame(
Count = c(4, 4, 4, 4, 3, 3, 3, 0, 2, 2, 0, 0),
LocationID = rep(1:3, each = 4),
Year = rep(c(1, 1, 1, 1, 2, 2), 2)
)
# Select the locations with at least 3 prescenses
select_factor_count_strictly_positive(
observation,
variable = "LocationID",
threshold = 3
)
# Select those locations in which the species is present in at least 2 years
select_factor_count_strictly_positive(
observation, variable = c("LocationID", "Year"), threshold = 2
)
# Select those years in which the species is present in at least 2 locations
select_factor_count_strictly_positive(
observation, variable = c("LocationID", "Year"),
threshold = 2,
dimension = 2
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.