BuildComparisons: Construct comparisons matrix

Description Usage Arguments Details Value

View source: R/BuildComparisons.R

Description

BuildComparisons is an internal function that construcs the comparisons matrix for ModelMultiData if comparisons not defined.

Usage

1
BuildComparisons(x, y, xName, yName)

Arguments

x

A matrix or list of matrices containing values for model.

y

A matrix containing values to be used on left-hand side of model (e.g. dependent variable). At least one of y or groups must be provided.

xName

Names of matrices provided in x. If x is a list with named elements, defaults to list names. Else, defaults to x1, x2, ..., xn where n is the number of matrices provided in x.

yName

Name of matrix or name of column in groups to be used on left-hand of model. (see formula details for default values)

Details

This function constructs the comparisons matrix if not provided. By default, if all matrices in x have the same rownames, ows with the same name will be grouped. Else, comparisons includes all possible combinations of rownames in x and y. Column names match values in yName and xName. Rows contain respective rownames or row numbers from each dataset in x and y that should be tested together.

Value

A matrix with all combinations of rows in x and y to be tested.


okg3/MultiDataAnalysis documentation built on March 28, 2020, 12:20 p.m.