Learn R Programming

ontologics (version 0.7.4)

new_class: Add a new valid class to an ontology

Description

Add a new valid class to an ontology

Usage

new_class(new, target, description = NULL, ontology = NULL)

Value

the updated ontology that contains the new class(es) defined here.

Arguments

new

character(1)
the new class label.

target

character(1)
the class into which the new class shall be nested.

description

character(1)
a verbatim description of the new class.

ontology

ontology(1)
either a path where the ontology is stored, or an already loaded ontology.

Examples

Run this code
ontoDir <- system.file("extdata", "crops.rds", package = "ontologics")
onto <- load_ontology(path = ontoDir)

onto <- new_class(new = "use type", target = "class", description = "something",
                  ontology = onto)

Run the code above in your browser using DataLab