Description Usage Arguments Details Value References See Also Examples
Convert some R object to YAML or JSON.
1 2 3 4 5 6 7 |
object |
Object of one of the classes belonging to
|
sep |
Logical scalar. Prepend YAML
document separator ‘ |
line.sep |
Character scalar used as output line separator. |
json |
Logical scalar. Create JSON instead
of YAML? If so, |
listify |
Logical scalar indicating whether after conversion to a list its non-list elements should be converted to lists if they have names. (Names of named vector are not conserved by default in output YAML). |
nodots |
Logical scalar indicating whether dots in list names should be converted to underscores. This is necessary in some situations (we met this problem when storing JSON documents in a document-oriented database). Converted names will additionally be marked by prepending an underscore, which assists in getting the original spelling back but is anything else than fail-safe. |
... |
Optional other arguments passed to
|
YAML is a useful data-serialisation standard that is understood by many programming languages. It is particularly more human readable than XML, and vector-like data structures (such as phenotype microarray measurements) can be much more compactly encoded.
Many PM data sets at once can be
batch-converted into YAML format using
batch_opm
. The output format for the child
classes is described in detail there, as well as other
aspects relevant in practice.
JSON is a subset of YAML and (in most
cases) can also be parsed by a YAML parser. For
generating JSON, the toJSON
function
from the rjson package would be used.
Character scalar (YAML string).
yaml::as.yaml yaml::yaml.load_file json::toJSON
Other conversion-functions: as.data.frame
,
extract
, extract_columns
,
flatten
, merge
,
oapply
, opmx
,
plates
, rep
,
rev
, sort
,
split
, unique
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.