| index_for_recode | R Documentation |
index_for_recode() identifies the positions of elements in x that match
any of the values specified in the from vector. This function is primarily
used to facilitate the recoding of values by pinpointing which elements in
x correspond to the from values and thus need to be replaced or updated.
index_for_recode(x, from)
x |
A vector of values in which to search for matches. |
from |
A vector of values to match against the elements in |
An integer vector of the same length as x, containing the indices
of the matched values from the from vector. If an element in x does not
match any value in from, the corresponding position in the output will be
NA. This index information is critical for subsequent recoding operations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.