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

Description Usage Arguments Value

View source: R/Score_init.R

Description

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

Usage

1
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 April 28, 2020, 1:06 a.m.