gen_agreemat: Create Agreement Matrix

Description Usage Arguments Details

View source: R/create_matrices.R

Description

Creates an agreement matrix by comparing either the row or the columns of a matrix

Usage

1
gen_agreemat(x, dim = c("row", "col"), missing = 99L)

Arguments

x

an integer matrix

dim

what dimensions to compare; must be either "row" or "column"; defaults to "row"

missing

value that should be treated as missing (defaults to 99). NA values are automatically transformed into missing values. If this is not desired assigning any other integer value to them will prevent this behavior.

Details

Let X be a n\times k matrix. If comparison across rows is demended (i.e., dim = "row", the function returns a n\times n matrix where the (i,j)th element is the number of columns on which the ith and the jth row agree by having the same value.


baruuum/btoolbox documentation built on Aug. 17, 2020, 1:29 a.m.