View source: R/verbose_coerce.R
verbose_coerce | R Documentation |
Coerce/convert a given x using the coercer function; if a warning is raised and a difference in NA cardinality is present a report of NA produced by coercion is printed, with optional rows id printed
verbose_coerce(
x,
coercer,
xname = NULL,
varname_msg = TRUE,
row_id = NULL,
df_name = ""
)
x |
vector to be converted |
coercer |
a function (tipically as.*) |
xname |
string used for progress (varname) printing |
varname_msg |
logical: print progress (varname and optionally source)? |
row_id |
vector or data.frame used to identify the coerced rows (for reporting purposes in case of issues) |
df_name |
character with data.frame name for reporting purposes (where does the variable come from?) |
## Not run:
verbose_coerce(c("a", 2L, 3L), as.integer)
verbose_coerce(c("a", 2L, 3L), as.integer, row_id = letters[1:3])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.