Learn R Programming

wrMisc (version 1.15.3.1)

diffCombin: Compute matrix of differences for all pairwise combinations of numeric vector

Description

diffCombin returns matrix of differences (eg resulting from subsititution) for all pairwise combinations of numeric vector 'x'.

Usage

diffCombin(x, diagAsNA = FALSE, prefix = TRUE, silent = FALSE, callFrom = NULL)

Value

numeric matrix of all pairwise differences

Arguments

x

numeric vector to compute differences for all combinations

diagAsNA

(logical) return all self-self combinations as NA (otherwise 0)

prefix

(logical) if TRUE, dimnames of output will specify orientation (prefix='from.' and 'to.')

silent

(logical) suppress messages

callFrom

(character) allow easier tracking of message(s) produced

See Also

diff for simple differences

Examples

Run this code
diffCombin(c(10,11.1,13.3,16.6))

Run the code above in your browser using DataLab