get_vector | R Documentation |
Gets vector by column and defactor if needed. Optionaly one can provide a fallback_value which will be returned if col is not specified.
get_vector(
x,
col,
rows = NULL,
choices = NULL,
fallback_value = NULL,
fallback_value_supersedes = FALSE,
fallback_value_any_missing = TRUE,
fallback_value_ensure_length = TRUE,
check_x_col_rows = TRUE,
which_call_to_report = -1L
)
x |
Input data. Can be vector, data.frame or a data.table |
col |
Column of interest in the input data |
rows |
Rows of interest |
choices |
Optional set of choices that return value should be subset of. Do no check if it is NULL. |
fallback_value |
If col is NULL then return this value (but
see |
fallback_value_supersedes |
A bolean toggle. When set col is ignored when fallback_value is provided. Otherwise (the default) if col is provided then fallback_value is ignored. |
fallback_value_any_missing |
Toggle check if missing values are allowed in fallback_value |
fallback_value_ensure_length |
Toggle if fallback_value
should we make it same length as |
check_x_col_rows |
Toggle wheather to use check_x, check_col, check_rows? |
which_call_to_report |
Which call to report if argument checks fail. |
A vector. Factors in imput data
are converted to string.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.