Description Usage Arguments Details Value See Also Examples
lapply_species
returns a list where each element is the result of
applying fun
to all species or the provided subset of species.
1 | lapply_species(fun, ..., species = NULL, raw = FALSE)
|
fun |
function. The function to be applied to the occurrence records of each species. Parameters are the species name and a dataframe with the occurrence records. |
... |
optional arguments to |
species |
dataframe or character vector. Dataframe like returned by
|
raw |
logical. If |
The parameters passed to fun
are speciesname
and
data
, which is a dataframe with the occurrence records and their
environmental data.
A list with one named entry for every species provided or for all species.
list_species
lapply_kfold_species
get_occurrences
lapply_kfold_species
, get_occurrences
,
list_species
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
get_occ_count <- function(speciesname, occ) {
nrow(occ)
}
record_counts <- lapply_species(get_occ_count)
sum(unlist(record_counts))
# count first 10
species <- list_species()
lapply_species(get_occ_count, species=species[1:10,])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.