iclip: Create an 'iface' specification from an example dataframe

View source: R/devtools.R

iclipR Documentation

Create an iface specification from an example dataframe

Description

When developing with interfacer it is useful to be able to base a function input off a prototype that you are for example using as testing. This function generates an interfacer::iface specification for the supplied data frame and copies it to the clipboard so that it can be pasted into the package code you are working on.

Usage

iclip(df, df_name = deparse(substitute(df)))

Arguments

df

a prototype dataframe

df_name

an optional name for the parameter (defaults to ⁠i_<df name>⁠)

Details

If the dataframe contains one or more list columns with nested dataframes the nested dataframes are also defined using a second iface specification.

Value

nothing, populates clipboard

Examples

if (interactive()) iclip(iris)

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