new_mapping | R Documentation |
Extend an ontology by creating mappings between classes and concepts of external vocabularies and the harmonised classes and concepts.
new_mapping(
new = NULL,
target,
source = NULL,
lut = NULL,
match = NULL,
certainty = NULL,
type = "concept",
ontology = NULL,
verbose = FALSE,
beep = NULL
)
new |
|
target |
|
source |
|
lut |
|
match |
|
certainty |
. |
type |
|
ontology |
|
verbose |
|
beep |
|
No return value, called for the side effect of adding new mappings to an ontology.
ontoDir <- system.file("extdata", "crops.rds", package = "ontologics")
onto <- load_ontology(path = ontoDir)
mapping <- data.frame(old = c("BIOENERGY CROPS", "Bioenergy woody",
"Other bioenergy crops"),
new = c("bioenergy plants", "Wood plantation for fuel",
"Algae for bioenergy"),
type = c("close", "broader", "broader"))
onto <- new_source(name = "externalDataset",
version = "0.0.1",
description = "a vocabulary",
homepage = "https://www.something.net",
license = "CC-BY-0",
ontology = onto)
onto <- get_concept(label = mapping$old, ontology = onto) %>%
new_mapping(new = mapping$new,
target = .,
match = mapping$type,
source = "externalDataset",
certainty = 3,
ontology = onto)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.