| migrate_json | R Documentation |
Read a dependency_graph or split_spec JSON file written under
an older schema_version and rewrite it at the installed version. The
round-trip fills any field introduced since the file was written with its
default (NA for missing sample_data columns), stamps the
current schema_version, and adds the $schema reference. Files
already at the current version are rewritten unchanged.
migrate_dependency_graph_json(path, out = path)
migrate_split_spec_json(path, out = path)
path |
Path to the JSON file to upgrade. |
out |
Path to write the upgraded file to. Defaults to |
The output path, invisibly.
if (requireNamespace("jsonlite", quietly = TRUE)) {
meta <- data.frame(sample_id = c("S1", "S2"), subject_id = c("P1", "P2"))
g <- graph_from_metadata(meta)
tmp <- tempfile(fileext = ".json")
write_dependency_graph(g, tmp)
migrate_dependency_graph_json(tmp)
unlink(tmp)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.