Learn R Programming

rdflib (version 0.2.9)

as_rdf: Coerce an object into RDF

Description

Coerce an object into RDF

Usage

as_rdf(
  x,
  rdf = NULL,
  prefix = NULL,
  base = getOption("rdf_base_uri", "localhost://"),
  context = NULL,
  key_column = NULL
)

Arguments

x

an object to coerce into RDF (list, list-like, or data.frame)

rdf

An existing rdf object, (by default a new object will be initialized)

prefix

A default vocabulary (URI prefix) to assume for all predicates

base

A base URI to assume for blank subject nodes

context

a named list mapping any string to a URI

key_column

name of a column which should be treated as the primary key in a table. must be unique

Examples

Run this code
as_rdf(mtcars)
as_rdf(list(repo = "rdflib", owner = list("id", "ropensci")))

Run the code above in your browser using DataLab