Add a new valid class to an ontology

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

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.

Value

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

Examples

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)