Skip to contents

Returns a single character string describing the axes and data entries. format = "markdown" renders as pipe-delimited tables; format = "text" uses indented lines.

Usage

contract_docs(contract, format = c("markdown", "text"))

Arguments

contract

A Contract().

format

One of "markdown" or "text".

Value

Character scalar.

Examples

c <- create_contract(
    axes = list(axis_contract("cell", RequiredInput, "per-cell axis")),
    vectors = list(contract_vector("cell", "donor", RequiredInput,
        "character", "donor id"))
)
cat(contract_docs(c), "\n")
#> ## Axes
#> 
#> name | expectation | description
#> ---- | ----------- | -----------
#> cell | RequiredInput | per-cell axis
#> 
#> ## Data
#> 
#> key | kind | expectation | description
#> --- | ---- | ----------- | -----------
#> cell / donor | vector | RequiredInput | donor id