Learn R Programming

rangeModelMetadata (version 0.1.5)

rmmCheckName: Check field names of a range model metadata list against conventions

Description

Identify nonstandard fields

Usage

rmmCheckName(
  rmm,
  cutoff_distance = 3,
  returnData = F,
  interactiveCorrections = FALSE
)

Value

Either an rmm list object (`returnData=FALSE`) or a data.frame containing information on possible name errors (`returnData=TRUE`).

Arguments

rmm

a range model metadata list

cutoff_distance

number of allowed different characters to match standardized names

returnData

logical. If FALSE, the function will return the (possibly) corrected rmm object. If TRUE, the function will return a data.frame containing information on incorrect names.

interactiveCorrections

logical. If TRUE, the user will be prompted to indicate whether the proposed correction should be accepted, thereby modifying the `rmm` object. If FALSE, suggestions will just be printed to the screen and users can edit them manually.

Author

Cory Merow <cory.merow@gmail.com>, Brian Maitner <bmaitner@gmail.com>,

Details

See Examples.

See Also

Other check: rmmCheckEmpty(), rmmCheckFinalize(), rmmCheckMissingNames(), rmmCheckValue(), rmmCleanNULLs()

Examples

Run this code
rmm <- rmmTemplate() # Make an empty template
rmm$dataPrep$biological$taxonomicHarmonization$taxonomy_source <- "The Plant List"
# Add a new, non-standard field
rmm.1 <- rmmCheckName(rmm)
# Checking the names should identify the new, non-standard field we've added ("taxonomy_source")


Run the code above in your browser using DataLab