AssembleReference: Assemble Reference

Description Usage Arguments Value Examples

View source: R/AssembleReference.R

Description

Function to build a reference dataframe selecting a case for each taxon from the available specimens in the references' database.

Usage

1
2
3
4
5
AssembleReference(
  combination,
  ref.db = referencesDatabase,
  thesaurus = zoologThesaurus$taxon
)

Arguments

combination

A dataframe or named list. Each (column) name identifies a taxon. Each column or list element must have a single element of type character, identifying one of the sources included in the references' database.

ref.db

A reference database. This is a named list of named lists of dataframes. The first level is named by taxon and the second level is named by reference source. Each dataframe includes the reference for the corresponding taxon and source. The default ref.db = referencesDatabase is provided as package zoolog data.

thesaurus

A thesaurus for taxa.

Value

A reference dataframe.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## `referenceSets` includes a series of predefined reference compositions.
referenceSets
## Actually the package `references` is build from them.
## We can rebuild any of them:
referenceCombi <- AssembleReference(referenceSets["Combi", ])

## Define an altenative reference combining differently the references'
## database:
refComb <- list(cattle = "Nieto", sheep = "Davis", Goat = "Clutton",
                pig = "Albarella", redDeer = "Basel")
userReference <- AssembleReference(refComb)

zoolog documentation built on Sept. 5, 2021, 5:37 p.m.