View source: R/graph-build-auto.R
| graph_from_metadata | R Documentation |
One-shot convenience builder that auto-detects canonical columns in a
metadata table, creates the corresponding node and edge sets, optionally
derives timepoint ordering from time_index, and assembles a
dependency_graph. Columns that are absent or entirely missing are
silently skipped.
graph_from_metadata(
meta,
columns = NULL,
dataset_name = NULL,
graph_name = NULL,
outcome_scope = c("sample", "subject"),
time_precedence = TRUE,
validate = TRUE,
validation_overrides = list()
)
meta |
A |
columns |
Optional named character vector passed to
|
dataset_name, graph_name |
Optional metadata labels. |
outcome_scope |
Either |
time_precedence |
If |
validate |
Forwarded to |
validation_overrides |
Forwarded to |
A validated dependency_graph.
meta <- data.frame(
sample_id = c("S1", "S2", "S3", "S4"),
subject_id = c("P1", "P1", "P2", "P2"),
batch_id = c("B1", "B2", "B1", "B2"),
timepoint_id = c("T1", "T2", "T1", "T2"),
time_index = c(1, 2, 1, 2),
outcome_id = c("ctrl", "case", "ctrl", "case")
)
g <- graph_from_metadata(meta, graph_name = "demo")
g
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.