Insets target vector back to input object (x)
Usage
inset_target(
vector,
x,
omitted_rows_value_for_new_col = NULL,
allow_na_in_vector = TRUE,
which_call_to_report = -5L,
return_only_target_col = FALSE,
...
)Arguments
- vector
Character vector to inset into the
xobject- x
Data to standardize. Character vector or data.frame or data.table
- omitted_rows_value_for_new_col
Alternative value
omitted_rows_valueto use in case we create new column in x. For example, it is use in insetting codes to avoid the defaultomitted_rows_valueuse initialcolin which case codes will be mixed with input values- allow_na_in_vector
Whether to allow NA in inset vector
- which_call_to_report
System call number (e.g., -2L) to include in report if arguments checks fails
- return_only_target_col
If toggled to TRUE then only return the vector to be inset (output_placement argument is ignored)
- ...
Arguments passed on to
standardize_optionscolColumn of interest (the one we need to standardize) in the
xobject (if it is data.frame like).rowsLogical vector to filter records of interest. Default is NULL which means do not filter records.
omitted_rows_valueIf
rowsparameter is set then mergeomitted_rows_valuewith the results (filtered byrows). Either single string or a character vector of lengthnrow(x). If NULL (the default) then original values ofcolare merged with results.output_placementWhere to inset retults (standardized vector) in the
xobject. Default options is 'replace_col' which overwrides thecolinxwith results. Other options:'omit' :: do not write results back to table (usually used when
append_output_copyis set for temporary values)'prepend_to_col' :: prepend to
col'append_to_col' :: append to
col'prepend_to_x' :: prepend to
xdata.frame like object'append_to_x' :: append to
xdata.frame like object
x_atomic_nameIf
xis vector use this name for original column if it is in results. Default is "x". Ifxis table the name ofcolwill be used.output_col_nameUse this name for the column with results (standardized values). Parts in curly brakeds are substitute strings. Options for substitutions are:
append_output_copyWhether to append a copy of result vector to
xobjectoutput_copy_col_nameHow the append copy wiil be named