Learn R Programming

simsem (version 0.2-8)

interpolate: Find the value of one vector relative to a value of another vector by interpolation

Description

Find the value of the resulting vector that have the position similar to the value of the baseline vector. If the starting value in the baseline vector is in between two elements, the resulting value will be predicted by linear interpolation.

Usage

interpolate(baselineVec, val, resultVec=NULL)

Arguments

baselineVec
The target vector to be used as a baseline. The resulting vector can be attached as the element names of this vector.
val
The value relative to the baseline vector to be used for projecting the resulting value
resultVec
The vector that the resulting value will be used to base their result form

Value

  • The interpolated value from the resulting vector relative to the value in the baseline vector

Examples

Run this code
# No Example

Run the code above in your browser using DataLab