iconvert | R Documentation |
This function is called by ivalidate()
and is not generally intended to be
used directly by the end user. It may be helpful in debugging during package
development to interactive test a iface
spec. iconvert
is an interactive
version of ivalidate()
.
iconvert(
df,
iface,
.imap = interfacer::imapper(),
.dname = "<unknown>",
.fname = "<unknown>",
.has_dots = TRUE,
.prune = FALSE,
.env = rlang::current_env()
)
df |
the dataframe to convert |
iface |
the interface spec as an |
.imap |
an optional |
.dname |
the name of the parameter value (optional). |
.fname |
the name of the function (optional). |
.has_dots |
internal library use only. Changes the nature of the error message. |
.prune |
do you want to remove non matching columns? |
.env |
internal use only |
the input dataframe coerced to be conformant to the iface
specification, or an informative error is thrown.
i_diamonds = iface(
color = enum(D,E,F,G,H,I,J,extra) ~ "the colour",
price = integer ~ "the price"
)
iconvert(ggplot2::diamonds, i_diamonds,.prune = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.