Learn R Programming

dataset (version 0.3.1)

dataset_ttl_write: Write a dataset into Turtle serialisation

Description

Write a dataset into a Turtle serialisation.

Usage

dataset_ttl_write(
  tdf,
  ttl_namespace = NULL,
  file_path = NULL,
  overwrite = TRUE
)

Value

A text file with the prefix and the observation serialisations.

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

Run this code
testtdf <- data.frame (s = c("eg:o1", "eg:01", "eg:02"),
                       p = c("a", "eg-var:", "eg-var"),
                       o = c("qb:Observation",
                             "\"1\"^^",
                             "\"2\"^^"))

examplefile <- file.path(tempdir(), "ttl_dataset_write.ttl")

dataset_ttl_write(tdf=testtdf, file_path = examplefile)

readLines(examplefile)

Run the code above in your browser using DataLab