convert: Efficiently convert selected columns of 'data.table' to nquad...

Description Usage Arguments Examples

View source: R/convert.R

Description

Efficiently convert selected columns of data.table to nquad statements

Usage

1
convert(dat, schema_list, type = "", datatype = "", done_so_far = 0)

Arguments

type

Type of nquads statements: 'uri' or 'literal'.

df

Name of the data.table as a length one character vector.

column_names

Names of the data.table to be converted as a character vector.

base

Base of the URIs to be minted in uriref,

paths

Further path of URI to be minted in uriref.

datatypes

Character vector containing the datatype of literals. May include language statements.

Examples

1
2
3
4
the_data = data.table(refs = c('a', 'b', 'c'), ltrl = c(1, 2, 3))
convert(df = "the_data", column_names = "ltrl", type = 'literal', datatypes = 'xsd:int')
convert(df = "the_data", column_names = "refs", type = 'uri', base = 'https://www.example.org/', paths = 'data/')
print(the_data)

rijpma/cower documentation built on March 11, 2020, 8:51 a.m.