Extract the interfacer
specification for a function
Examples
my_iface = iface(
col1 = integer + group_unique ~ "an integer column",
.default = test_df
)
# the function x defines a formal `df` with default value of `my_iface`
# this default value is used to validate the structure of the user supplied
# value when the function is called.
x = function(df = my_iface, ...) {
df = ivalidate(df,...)
return(df)
}
get_iface(x,"df")
#> A dataframe containing the following columns:
#> * col1 (integer + group_unique) - an integer column
#> Any grouping allowed.
#> A default value is defined.