write_nquads: write object out as nquads

Description Usage Arguments Examples

View source: R/write_nquads.R

Description

write object out as nquads

Usage

1

Arguments

x

an object that can be represented as nquads

file

output filename

...

additional parameters, see examples

Examples

1
2
3
4
tmp <- tempfile(fileext = ".nq")
library(datasets)
write_nquads(iris, tmp)
read_nquads(tmp)

Example output

Warning message:
In poor_mans_nquads(df, file, ...) : prefix not declared, using df:
Total of 750 triples, stored in hashes
-------------------------------
<df:28> <df:Sepal.Width> "3.5"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<df:3> <df:Sepal.Width> "3.2"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<df:126> <df:Petal.Width> "1.8"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<df:38> <df:Petal.Width> "0.1"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<df:111> <df:Sepal.Length> "6.5"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<df:149> <df:Sepal.Width> "3.4"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<df:84> <df:Sepal.Length> "6"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<df:87> <df:Petal.Width> "1.5"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<df:42> <df:Species> "setosa"^^<http://www.w3.org/2001/XMLSchema#string> .
<df:138> <df:Petal.Width> "1.8"^^<http://www.w3.org/2001/XMLSchema#decimal> .

... with 740 more triples

rdflib documentation built on Jan. 10, 2020, 9:07 a.m.