sMatrix: Similarity matrix.

Description Usage Arguments Value Author(s)

View source: R/needleman-wunsch.R

Description

Construct a similarity matrix between 2 vectors.

Usage

1
sMatrix(a, b, filter = function(f1, f2) ifelse(f1 == f2, 1, -1))

Arguments

a

Vector a.

b

Vector b.

filter

A similarity function. Default: 1 if equal, -1 otherwise.

Value

A similarity matrix.

Author(s)

phil


obAnalytics documentation built on May 1, 2019, 7:04 p.m.