Skip to contents

Produces text input for D2 to make a diagram of a given relation, usually rendered with SVG.

Usage

# S3 method for class 'relation'
d2(x, name = NA_character_, ...)

Arguments

x

a relation.

name

a character scalar, giving the name of the schema, if any.

...

further arguments passed to or from other methods.

Value

A scalar character, containing text input for D2.

Details

Each relation is presented as a set of rows, one for each attribute in the relation. These rows include information about the attribute classes.

See also

The generic d2.