substituteValues: Substitute final values for original values in a vector

View source: R/substituteValues.R

substituteValuesR Documentation

Substitute final values for original values in a vector

Description

Function to substitute final values for original values in a vector.

Usage

substituteValues(v, orig, finl)

Arguments

v
  • vector of values on which to perform substitution

orig
  • vector of original values, matching those in finl by position

finl
  • vector of final values, matching those in orig by position

Details

original and final values are matched by position in the respective areas (i.e. finl[j] is substituted for orig[j] in v wherever orig[j] occurs). Values in v that are not in orig are not changed in the result.

Value

a vector of the same length as v with the substituted values replacing the original values.


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.