iproto: Generate a zero length dataframe conforming to an 'iface'...

View source: R/iproto.R

iprotoR Documentation

Generate a zero length dataframe conforming to an iface specification

Description

This function is used internally for default values for a dataframe parameter. It generates a zero length dataframe that conforms to a iface specification, in terms of column names, data types and groupings. Such a dataframe is not guaranteed to be fully conformant to the iface specification if, for example, completeness constraints are applied.

Usage

iproto(iface)

Arguments

iface

the specification

Value

a dataframe conforming to iface

Examples

i = interfacer::iface(
  col1 = integer ~ "A number",
  col2 = character ~ "A string"
)

iproto(i)

interfacer documentation built on April 4, 2025, 6:13 a.m.