Movatterモバイル変換


[0]ホーム

URL:


Title:Interact with Data Type Registries and Create Machine-ReadableData
Version:1.1.2
Description:You can load a schema from a DTR (data type registry) as an R object. Use this schema to write your data in JSON-LD (JavaScript Object Notation for Linked Data) format to make it machine readable.
License:MIT + file LICENSE
URL:https://gitlab.com/TIBHannover/lki/knowledge-loom/dtreg-r
BugReports:https://gitlab.com/TIBHannover/lki/knowledge-loom/dtreg-r/-/issues
Depends:R (≥ 4.1.0)
Imports:httr2, jsonlite, methods, R6, stringr
Suggests:knitr, rmarkdown, sets, stats, testthat (≥ 3.0.0)
VignetteBuilder:knitr
Config/testthat/edition:3
Encoding:UTF-8
RoxygenNote:7.2.3
NeedsCompilation:no
Packaged:2025-11-24 09:02:33 UTC; LezhninaO
Author:Olga LezhninaORCID iD [aut], Manuel PrinzORCID iD [aut], Markus StockerORCID iD [aut, cre], Open Research Knowledge Graph Project and Contributors [cph]
Maintainer:Markus Stocker <markus.stocker@tib.eu>
Repository:CRAN
Date/Publication:2025-11-24 13:30:13 UTC

dtreg: Interact with Data Type Registries and Create Machine-Readable Data

Description

You can load a schema from a DTR (data type registry) as an R object. Use this schema to write your data in JSON-LD (JavaScript Object Notation for Linked Data) format to make it machine readable.

Author(s)

Maintainer: Markus Stockermarkus.stocker@tib.eu (ORCID)

Authors:

Other contributors:

See Also

Useful links:


Load classes for a schema with the known identifier

Description

Load a list of R6 classes for a schema identifier, such asan ePIC datatype DOI or an ORKG template URL.The classes contain information of the requested schema and nested schemata.

Usage

load_datatype(datatype_id)

Arguments

datatype_id

A schema identifier, such as a DOI or a URL

Value

A list of R6 classes

Examples

dt <- dtreg::load_datatype("https://doi.org/21.T11969/aff130c76e68ead3862e")

Show schema fields

Description

Show which fields of a schema can be used for creating an instance

Usage

show_fields(datatype)

Arguments

datatype

An R6 class from dtreg::load_datatype

Value

A character vector of available fields

Examples

dt <- dtreg::load_datatype("https://doi.org/21.T11969/aff130c76e68ead3862e")dtreg::show_fields(dt$data_item())

Write an instance in JSON-LD format

Description

Write an instance of a schema-related classin JSON-LD format as a string

Usage

to_jsonld(instance)

Arguments

instance

An instance of an R6 class

Value

JSON string in JSON-LD format

Examples

dt <- dtreg::load_datatype("https://doi.org/21.T11969/aff130c76e68ead3862e")instance <- dt$data_item(label = "my_results")result <- dtreg::to_jsonld(instance)

[8]ページ先頭

©2009-2025 Movatter.jp