lookup_gideon_id: GIDEON Item Identification Code Lookup

View source: R/lookup_gideon_id.R

lookup_gideon_idR Documentation

GIDEON Item Identification Code Lookup

Description

Finds the ID for a disease, bacteria, etc. in the GIDEON database. HINT: Copy and paste the item name from the GIDEON dashboard.

Usage

lookup_gideon_id(category, item = NULL, error_msg = TRUE)

Arguments

category

A string that is one of the following categories: diseases, drugs, vaccines, agents, vectors, vehicles, reservoirs, bacteria, mycobacteria, yeasts, countries, regions

item

A string of the name of the item to search. If this parameter is omitted, the function will return a dataframe representing all items and related GIDEON identification codes.

error_msg

Throw an error message if the lookup does not find the specified item rather than returning NULL.

Value

  • If the item parameter matches an entry from the item category, the string or integer code will be returned.

  • If the item parameter fails to match an entry from the item category, NULL will be returned.

  • If the item parameter is omitted, return a dataframe with all items in the category, including the name and code.

Examples

# Find the disease code given the name.
ebola_code <- lookup_gideon_id("diseases", "Ebola")

# Find a country code given the country name
us_code <- lookup_gideon_id("countries", "United States")

# List all the disease vectors
all_vectors <- lookup_gideon_id("vectors")


gideononline/gideon-api-r documentation built on March 19, 2022, 5:07 p.m.