View source: R/structure-arrays.R
| structure_from_arrays | R Documentation |
A format-independent entry point for parsers. Node IDs are one-based positions
in mono; edges point from parent to child. Input order need not be canonical.
Each record contains mono, sub, edges, linkage, and anomer.
edges is an interleaved integer vector c(parent, child, ...).
sub contains comma-separated substituent tokens (or empty strings).
Optional alditol defaults to FALSE.
structure_from_arrays(x, on_failure = c("error", "na"))
x |
A list of structure records. A |
on_failure |
Either |
Optional floating_parts is a list of records containing root, nodes,
linkage, and parents. Each nodes vector must contain exactly the nodes
in that disconnected component. Optional floating_substituents is a list of
records containing substituent and parents. Empty parents means all
feasible nodes; all indices refer to the original input arrays. Singleton
candidates are resolved during canonicalization.
Records above the native backend's size guard use the graph reference path;
the guard is not an input-size limit. Only failing or unsupported records
use that path. No format-specific strings are generated and reparsed.
Failures have class glyrepr_error_structure_failure and fields position,
input_name, and reason. Recovery warnings have class
glyrepr_warning_structure_failure and fields positions and reasons.
A glyrepr_structure vector, with graph storage deduplicated by
canonical IUPAC key.
structure_from_arrays(list(list(
mono = c("Glc", "Gal"), sub = c("", ""),
edges = c(1L, 2L), linkage = "b1-4", anomer = "?1"
)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.