mx.expand: Expand a square dissimilarity matrix

Description Usage Arguments Value

View source: R/mx_expand.r

Description

This function accepts a conversion table and a square matrix as input to return a new square matrix with changed row and column names referring to id labels in conversion table.

Usage

1
2
3
4
5
6
7
8
mx.expand(
  conversion.table,
  mx,
  noise0 = TRUE,
  noise.lo = 0,
  noise.hi = 0.01,
  ...
)

Arguments

conversion.table

A data.frame containting two columns; the first with id labels, the second with the names of rows (= names of columns) in square matrix mx (see below), to which it refers.

mx

A square numerical matrix with equal row and column names that the second column of conversion.table refers to.

noise0

A logical determining whether to add noise to zero values using function zero.noise. Defaults to TRUE.

noise.lo

A numerical passed to zero.noise, specifying the lower boundary of the random value to be inserted. Only used if noise0 is TRUE.

noise.hi

A numerical passed to zero.noise, specifying the upper boundary of the random value to be inserted. Only used if noise0 is TRUE.

...

Further arguments passed to zero.noise.

Value

A matrix with id in conversion.table used as row/column names.


joheli/yea13 documentation built on Sept. 18, 2020, 11:21 p.m.