mapcols: Find a mapping of columns from cols into refcols that most...

Description Usage Arguments Value Examples

View source: R/crosspca.R

Description

Find a mapping of columns from cols into refcols that most preserves similarity.

Usage

1
mapcols(cols, refcols)

Arguments

cols

matrix

refcols

matrix nrow(cols)==nrow(refcol), ncol(cols)>=ncol(refcols)

Value

mapping perm of cols to refcols s.t. cols[,perm[j]] ~ refcols[,j] j in seq_len(refcols)

Examples

1
2
3
4
x <- USArrests
perm <- c(2,3,4,1)
x2 <- x[,perm]
mp <- crosspca:::mapcols(x2,x) # should be inverse permutation.

WinVector/crosspca documentation built on June 24, 2020, 5:09 p.m.