View source: R/var_namespace.R
var_namespace | R Documentation |
Retain the namespace part of a permanent, global variable identifier which is independent of the R instance in use.
var_namespace(x, ...)
var_namespace(x) <- value
get_variable_namespaces(x, ...)
namespace_attribute(x)
get_namespace_attribute(x)
set_namespace_attribute(x, value)
namespace_attribute(x) <- value
x |
a vector |
... |
Further potential parameters reserved for inherited classes. |
value |
a character string or |
The namespace attribute is useful when users join or concatenate data from remote, linked, and open data sources. In such cases, variable identifiers (labels or names) are often resolved with a common namespace prefix, which, together with the namespace, forms a URI or IRI permanent identifier for the variable. Retaining the namespace in such cases allows cross-validation or success later updates of the vector (as a column of a dataset.)
get_variable_namespaces()
is identical to var_namespace()
.
See vignette("defined", package = "dataset")
to use comprehensively
with variable labels, namespaces, units of measures, and machine-independent
permanent variable identifiers.
The namespace attribute of a vector constructed with defined
.
Other defined metadata methods and functions:
defined()
,
var_label()
,
var_unit()
qid = defined(c("Q275912", "Q116196078"), namespace = "https://www.wikidata.org/wiki/")
var_namespace(qid)
# To remove a namespace
var_namespace(qid) <- NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.