Searches for a pattern in a vector and replaces it with a provided replacement pattern.
replace_portion(invec, find, replace)
invec | The input vector. |
---|---|
find | What is the sequence that you're looking for? |
replace | What do you want to replace the values with? |
A vector the same length as the input vector.
Ananda Mahto
#> [1] 1 2 3 9 9 9 0 1 2 3 4 9 9 9