reduceMatrix: Reduce a matrix by the name of variables.

Description Usage Arguments Value Author(s) Examples

Description

This function reduce a square matrix keeping only those variables specified by the users. It also allow to keep the whole matrix or the lower triangle only.

Usage

1
reduceMatrix(x, varNames=NULL, lowerTri=F)

Arguments

x

Matrix. Matrix to be reduced.

varNames

String vector. It should contain variables name in x to be keeped in the output matrix.

lowerTri

Logical value, indicating if the output matrix should include all the values or only the lower triangle. Default value is returning the whole matrix.

Value

Matrix. Which will be a submatrix of x, where only the variables specified (varNames) are keeped.

Author(s)

Diego Nieto Lugilde

Examples

1
2
3
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

dinilu/paleoCLMs-package documentation built on May 15, 2019, 8:46 a.m.