Skip to content

Commit 82f36f6

Browse files
committed
version 0.2.0
1 parent eca1438 commit 82f36f6

4 files changed

Lines changed: 38 additions & 45 deletions

File tree

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: tuRtle
22
Title: Parse and Export R Data with the Turtle Syntax for the Resource Description Framework.
3-
Date: 2025-07-13
4-
Version: 0.1.1002
3+
Date: 2025-07-16
4+
Version: 0.2.0
55
Authors@R:
66
c(person(given = "Daniel", family = "Antal",
77
email = "daniel.antal@dataobservatory.eu",
@@ -21,7 +21,6 @@ BugReports: https://github.com/dataobservatory-eu/tuRtle/issues
2121
License: GPL (>= 3)
2222
Encoding: UTF-8
2323
Roxygen: list(markdown = TRUE)
24-
RoxygenNote: 7.3.2
2524
Imports:
2625
dataset (>= 0.3.4),
2726
utils
@@ -32,3 +31,4 @@ Suggests:
3231
testthat (>= 3.0.0)
3332
Config/testthat/edition: 3
3433
Language: en-GB
34+
Config/roxygen2/version: 8.0.0

README.Rmd

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,27 @@ remotes::install_github("dataobservatory-eu/tuRtle", build = FALSE)
3737
Let us organise statements into a table of *s* subject, *p* predicate and *o* object:
3838

3939
```{r tdfdef, results='asis'}
40-
tdf <- data.frame (s = c("eg:01","eg:02", "eg:01", "eg:02", "eg:01" ),
41-
p = c("a", "a", "eg-var:", "eg-var:", "rdfs:label"),
42-
o = c("qb:Observation",
43-
"qb:Observation",
44-
"\"1\"^^<xs:decimal>",
45-
"\"2\"^^<xs:decimal>",
46-
'"Example observation"')
47-
)
40+
tdf <- data.frame(
41+
s = c("eg:01", "eg:02", "eg:01", "eg:02", "eg:01"),
42+
p = c("a", "a", "eg-var:", "eg-var:", "rdfs:label"),
43+
o = c(
44+
"qb:Observation",
45+
"qb:Observation",
46+
"\"1\"^^<xs:decimal>",
47+
"\"2\"^^<xs:decimal>",
48+
'"Example observation"'
49+
)
50+
)
4851
4952
knitr::kable(tdf)
5053
```
5154

5255
The Turtle serialisation is this, written into an `example_file`. The parameter `ttl_namespace = NULL` results in using the default prefixes of the dataset package.
5356

54-
```{r ttl_example}
57+
```{r ttl_example, eval=FALSE}
5558
library(tuRtle)
56-
example_file<- file.path(tempdir(), "example_ttl.ttl")
57-
ttl_write(tdf=tdf, ttl_namespace = NULL, file_path = example_file)
59+
example_file <- file.path(tempdir(), "example_ttl.ttl")
60+
ttl_write(tdf = tdf, ttl_namespace = NULL, file_path = example_file)
5861
5962
readLines(example_file)
6063
```

README.md

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ Let us organise statements into a table of *s* subject, *p* predicate
3232
and *o* object:
3333

3434
``` r
35-
tdf <- data.frame (s = c("eg:01","eg:02", "eg:01", "eg:02", "eg:01" ),
36-
p = c("a", "a", "eg-var:", "eg-var:", "rdfs:label"),
37-
o = c("qb:Observation",
38-
"qb:Observation",
39-
"\"1\"^^<xs:decimal>",
40-
"\"2\"^^<xs:decimal>",
41-
'"Example observation"')
42-
)
35+
tdf <- data.frame(
36+
s = c("eg:01", "eg:02", "eg:01", "eg:02", "eg:01"),
37+
p = c("a", "a", "eg-var:", "eg-var:", "rdfs:label"),
38+
o = c(
39+
"qb:Observation",
40+
"qb:Observation",
41+
"\"1\"^^<xs:decimal>",
42+
"\"2\"^^<xs:decimal>",
43+
'"Example observation"'
44+
)
45+
)
4346

4447
knitr::kable(tdf)
4548
```
@@ -48,8 +51,8 @@ knitr::kable(tdf)
4851
|:------|:-----------|:----------------------|
4952
| eg:01 | a | <qb:Observation> |
5053
| eg:02 | a | <qb:Observation> |
51-
| eg:01 | eg-var: | “1”^^<xs:decimal> |
52-
| eg:02 | eg-var: | “2”^^<xs:decimal> |
54+
| eg:01 | eg-var: | “1”<xs:decimal> |
55+
| eg:02 | eg-var: | “2”<xs:decimal> |
5356
| eg:01 | rdfs:label | “Example observation” |
5457

5558
The Turtle serialisation is this, written into an `example_file`. The
@@ -58,26 +61,10 @@ of the dataset package.
5861

5962
``` r
6063
library(tuRtle)
61-
example_file<- file.path(tempdir(), "example_ttl.ttl")
62-
ttl_write(tdf=tdf, ttl_namespace = NULL, file_path = example_file)
64+
example_file <- file.path(tempdir(), "example_ttl.ttl")
65+
ttl_write(tdf = tdf, ttl_namespace = NULL, file_path = example_file)
6366

6467
readLines(example_file)
65-
#> [1] "@prefix owl: <http://www.w3.org/2002/07/owl#> ."
66-
#> [2] "@prefix qb: <http://purl.org/linked-data/cube#> ."
67-
#> [3] "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ."
68-
#> [4] "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> ."
69-
#> [5] "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> ."
70-
#> [6] ""
71-
#> [7] ""
72-
#> [8] "eg:01 a qb:Observation;"
73-
#> [9] " eg-var: \"1\"^^<xs:decimal> ;"
74-
#> [10] " rdfs:label \"Example observation\" ."
75-
#> [11] ""
76-
#> [12] ""
77-
#> [13] "eg:02 a qb:Observation;"
78-
#> [14] " eg-var: \"2\"^^<xs:decimal> ."
79-
#> [15] ""
80-
#> [16] ""
8168
```
8269

8370
## Code of Conduct

tests/spelling.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
if(requireNamespace('spelling', quietly = TRUE))
2-
spelling::spell_check_test(vignettes = TRUE, error = FALSE,
3-
skip_on_cran = TRUE)
1+
if (requireNamespace("spelling", quietly = TRUE)) {
2+
spelling::spell_check_test(
3+
vignettes = TRUE, error = FALSE,
4+
skip_on_cran = TRUE
5+
)
6+
}

0 commit comments

Comments
 (0)