enpaire: Create a Pairwise List from a Matrix

Description Usage Arguments Value Author(s) See Also Examples

Description

Transform a matrix or dist object to a pairwise list.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
enpaire(x, ...)

## Default S3 method:
enpaire(x, ...)

## S3 method for class 'dist'
enpaire(x, upper = T, lower = T, ...)

## S3 method for class 'matrix'
enpaire(x, upper = T, lower = T, ...)

Arguments

x

Object of class matrix.

...

Arguments passed to methods.

upper

Logical, return values from upper triangle.

lower

Logical, return values from lower triangle.

Value

Returns a data.frame. The first and second column represent the dimension names for a value in x. The following columns contain the values for the upper or lower triangle.

Author(s)

Sven E. Templer

See Also

squarematrix

Examples

1
2
3
4
5
6
7
#

m <- matrix(letters[1:9], 3, 3, dimnames = list(1:3,1:3))
enpaire(m)
enpaire(m, lower = FALSE)

#

miscset documentation built on May 2, 2019, 4:01 a.m.