Export an ontology as RDF

export_as_rdf(ontology, filename)

Arguments

ontology

ontology(1)
an already loaded or created ontology object.

filename

character(1)
the filename of the exported ontology. The format of the exported ontology is guessed by the extension of the filename. The guessing is performed by the rdflib package. Valid extensions are ".rdf" for "rdfxml", ".nt" for "ntriples", ".ttl" for "turtle" or ".json" for "jsonld".

Value

No return value, called for the side effect of exporting an ontology.

Examples

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

if (FALSE) { # \dontrun{

  export_as_rdf(ontology = onto, filename = "onto.ttl")
} # }