pairwise_col_diff: Compute pairwise difference between matrix columns

View source: R/prep_cpop.R

pairwise_col_diffR Documentation

Compute pairwise difference between matrix columns

Description

Compute pairwise difference between matrix columns

Usage

pairwise_col_diff(x)

Arguments

x

A data matrix of size n times p. Where rows are observations and columns are features.

Value

A matrix of size n times (p choose 2), where each column is the difference between two of the original columns.

Examples

n = 1
p = 4
x = matrix(rep(1:p, n), nrow = n, ncol = p, byrow = TRUE)
colnames(x) = paste0("X", 1:p)
pairwise_col_diff(x)

kevinwang09/top documentation built on April 20, 2022, 3:01 a.m.