Write a dataset into a Turtle serialisation.
Arguments
- tdf
A dataset in exactly three columns.
- ttl_namespace
The namespace definitions of the dataset.
- file_path
The path to the file that should be written or appended.
- overwrite
If the file exists, overwrite it? Defaults to
TRUE.
Examples
tdf <- data.frame (s = c("eg:01","eg:02", "eg:01", "eg:02", "eg:01" ),
p = c("a", "a", "eg-var:", "eg-var:", "rdfs:label"),
o = c("qb:Observation",
"qb:Observation",
"\"1\"^^<xs:decimal>",
"\"2\"^^<xs:decimal>",
'"Example observation"'))
examplefile <- file.path(tempdir(), "ttl_dataset_write.ttl")
dataset_ttl_write(tdf=tdf, file_path = examplefile)
#> Error in ttl_observations_write(tdf, file_path): could not find function "ttl_observations_write"
readLines(examplefile)
#> [1] "@prefix owl: <http://www.w3.org/2002/07/owl#> ."
#> [2] "@prefix qb: <http://purl.org/linked-data/cube#> ."
#> [3] "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ."
#> [4] "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> ."
#> [5] "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> ."
