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

Description Usage Arguments Value

View source: R/Score_init.R

Description

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

Usage

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