replace_informal_name_to_latin_name: Replace Informal Names with Latin Names

View source: R/utils.R

replace_informal_name_to_latin_nameR Documentation

Replace Informal Names with Latin Names

Description

This function takes a data frame names_df containing "latin_name" and "informal_name" columns and an input string as input. It replaces informal species names in the input string with their corresponding Latin names based on the information in names_df. If the input string contains underscores ("_"), it assumes a comparison between two species and replaces both informal names. Otherwise, it replaces the informal name in the input string.

Usage

replace_informal_name_to_latin_name(names_df, input)

Arguments

names_df

A data frame with "latin_name" and "informal_name" columns.

input

The input string that may contain informal species names.

Value

A modified input string with informal names replaced by Latin names.


shinyWGD documentation built on April 4, 2025, 2:28 a.m.