Learn R Programming

fHMM (version 1.1.1)

match_all: Best-possible match of two numeric vectors

Description

This function matches the positions of two numeric vectors as good as possible.

Usage

match_all(x, y)

Value

An integer vector of length length(x) with the positions of y

in x.

Arguments

x

A numeric vector.

y

Another numeric vector of the same length as x.

Examples

Run this code
if (FALSE) {
x <- c(-1, 0, 1)
y <- c(0.1, 2, -1.2)
match_all(x = x, y = y)
}

Run the code above in your browser using DataLab