Learn R Programming

ontologics (version 0.7.4)

export_as_rdf: Export an ontology as RDF

Description

Export an ontology as RDF

Usage

export_as_rdf(ontology, filename)

Value

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

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".

Examples

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

if (FALSE) {

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

Run the code above in your browser using DataLab