Skip to contents

Create RDF triple statements to annotate your dataset with standard, interoperable metadata.

Usage

n_triples(triples)

Arguments

triples

A character vector of concatenated N-Triples, created with n_triple().

Value

A character vector of unique N-Triple strings.

Details

N-Triples is a line-based serialization format for RDF. It is easy to parse and widely supported. For details, see the W3C RDF 1.2 N-Triples specification.

Examples

triple_1 <- n_triple(
  "http://example.org/show/218",
  "http://www.w3.org/2000/01/rdf-schema#label",
  "That Seventies Show"
)

triple_2 <- n_triple(
  "http://example.org/show/218",
  "http://example.org/show/localName",
  '"Cette Série des Années Septante"@fr-be'
)

n_triples(c(triple_1, triple_2, triple_1))
#> [1] "<http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> \"That Seventies Show\"^^<http://www.w3.org/2001/XMLSchema#string> ."
#> [2] "<http://example.org/show/218> <http://example.org/show/localName> \"\"Cette Série des Années Septante\"@fr-be\" ."