Add a new valid class to an ontology
new_class(new, target, description = NULL, ontology = NULL)
character(1)
the new class label.
character(1)
the class into which the new
class shall be nested.
character(1)
a verbatim description of
the new class.
ontology(1)
either a path where the ontology is
stored, or an already loaded ontology.
the updated ontology that contains the new class(es) defined here.
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)