| vswitch-deprecated {kimisc} | R Documentation |
Vectorized switch
Description
The function vswitch is a vectorized version of
base::switch() optimized for performance.
Usage
vswitch(EXPR, ...)
Arguments
EXPR |
an expression evaluating to a number or a character string. |
... |
the list of alternatives. If it is intended that
|
Details
Only the EXPR argument is treated as a vector. In particular,
if any of the alternatives (or the default alternative) is a vector, the
result will be a list of vectors.
Value
The value of one of the elements of ...,
or NA whenever no element is selected.
Contrary to base::switch() the result is
always visible.
See Also
Other deprecated functions: coalesce.na-deprecated,
df_to_list-deprecated,
hms.to.seconds-deprecated,
kimisc-deprecated,
list_to_df-deprecated,
nc-deprecated,
nlist-deprecated,
ofactor-deprecated,
sample.rows-deprecated,
seconds.to.hms-deprecated,
thisfile-deprecated,
tll-deprecated