Learn R Programming

madshapR (version 2.0.0)

is_taxonomy: Test if an object is a valid taxonomy

Description

Confirms whether the input object is a valid taxonomy. This function mainly helps validate input within other functions of the package but could be used to check if a taxonomy is valid.

Usage

is_taxonomy(object)

Value

A logical.

Arguments

object

A potential taxonomy to be evaluated.

Details

A taxonomy is a classification schema that can be defined for variable attributes. A taxonomy is usually extracted from an Opal environment, and a taxonomy object is a data frame that must contain at least the columns taxonomy, vocabulary, and terms. Additional details about Opal taxonomies are available online.

Examples

Run this code
{

# use madshapR_examples provided by the package
is_taxonomy(madshapR_examples$`taxonomy_example`)
is_taxonomy(madshapR_examples$`dataset_example`)

}

Run the code above in your browser using DataLab