Description Usage Arguments Details Value See Also Examples
Functions to check if an object is a keyvalue object, or coerce it if possible.
1 2 3 4 5 6 7 8 9 | as.keyvalue(x, ...)
## S3 method for class 'data.frame'
as.keyvalue(x, standard_var_names = NULL, ...)
## Default S3 method:
as.keyvalue(x, y, ...)
is.keyvalue(x)
|
x |
object to test for, or coerce to, keyvalue (see the details). |
... |
arguments passed between methods |
standard_var_names |
a character vector with standard names for variables decoded with this key-values. |
y |
a value vector if |
x
can be of:
a name of a package internal (or external) keyvalue object (character of length one)
a data.frame
with two columns "key" (with unique cells) and "value".
a list as
described in as.keyvalue.list
a named vector with all names unique
an unnamed vector with unique cells if supplemented by additional vector (y)
as.keyvalue
returns a data.frame with additional class
keyvalue
that fulfills the requirements for a keyvalue
object
and with the key
column as character. It also has two extra attributes
standard_var_names
as described above and keyvalue11
which is
TRUE
for keyvalue objects with a 1:1 relation between its keys and
values (otherwise FALSE).
as.keyvalue.list, decode, summary.keyvalue, key_and_value
1 2 3 | snomed2 <- as.keyvalue(snomed)
is.keyvalue(snomed2)
summary(snomed2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.