Produces text input for D2 to make a diagram of a given relation, usually rendered with SVG.
# S3 method for relation
d2(x, name = NA_character_, nest_level = Inf, ...)A scalar character, containing text input for D2.
a relation.
a character scalar, giving the name of the schema, if any.
an integer, giving the amount of nesting allowed when giving the class of a list column. Since lists can hold anything in R, this allows showing common element classes and lengths.
further arguments passed to or from other methods.
Each relation is presented as a set of rows, one for each attribute in the relation. These rows include information about the attribute classes.
The generic d2.