Crosswalk between different metadata fields used by different repositories,
registries and archives. For more details see https://codemeta.github.io/crosswalk
This function requires an internet connection to obtain the latest crosswalk table.
This function essentially applies the crosswalk table shown by crosswalk_table
to a given JSON metadata record.
crosswalk(x, from, to = "codemeta", codemeta_context = getOption("codemeta_context", "http://purl.org/codemeta/2.0"))
x | a JSON list or file with data fields to be crosswalked |
---|---|
from | the corresponding column name from the crosswalk table. |
to | the column to translate into, assumes "codemeta" by default |
codemeta_context | the address or contents of codemeta context. Leave at default |
a `json` object containing a valid codemeta.json file created by crosswalking the input JSON
# NOT RUN { ## Crosswalk data returned by the GitHub API into CodeMeta format r <- gh::gh("/repos/:owner/:repo", owner = "ropensci", repo = "EML") crosswalk(r, "GitHub") # }