export_as_rdf: Export an ontology as RDF

View source: R/export_as_rdf.R

export_as_rdfR Documentation

Export an ontology as RDF

Description

Export an ontology as RDF

Usage

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)

## Not run: 

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

## End(Not run)

ontologics documentation built on May 31, 2023, 6:53 p.m.