diff_lists: Computes the sum of absolute differences between two lists.

View source: R/Score_init.R

diff_listsR Documentation

Computes the sum of absolute differences between two lists.

Description

Computes the sum of absolute differences between two lists using diff_vecs().

Usage

diff_lists(l1, l2, name = NULL)

Arguments

l1

A list.

l2

A list.

name

A string, default to NULL. If not NULL, computes the differences in the l1[[name]] and l2[[name]].

Value

Returns the sum of absolute differences between l1 and l2 if name is NULL, or that between l1[[name]] and l2[[name]] otherwise. If name is not NULL and if name is in exactly one of l1 and l2, returns Inf; if name is in neither, returns NA. Exception: Returns a positive integer if the two elements compared hold NA, NULL or Inf values in different places.


genscore documentation built on May 29, 2024, 9 a.m.