diff_vecs: Computes the sum of absolute differences in the finite...

View source: R/Score_init.R

diff_vecsR Documentation

Computes the sum of absolute differences in the finite non-NA/NULL elements between two vectors.

Description

Computes the sum of absolute differences in the finite non-NA/NULL elements between two vectors.

Usage

diff_vecs(l1, l2, relative = FALSE)

Arguments

l1

A vector.

l2

A vector.

relative

A boolean, default to FALSE. If TRUE, returns the relative difference (sum of absolute differences divided by the elementwise minimum between l1 and l2).

Value

The sum of (relative) absolute differences in l1 and l2, or a positive integer if two vectors differ in length or hold NA, NULL or Inf values in different places.


genscore documentation built on May 31, 2023, 6:28 p.m.