Description Usage Arguments Value Examples
View source: R/similarity-scores.R
Computes the scaled difference between a vector of categorical variables and
a matrix of categorical variables. Should not usually be called by hand.
Instead, use the calcScores2
function.
1 | catDiffs2(vec, dat)
|
vec |
a character vector. Each value in the vector corresponds to a unique variable. |
dat |
a character matrix or data.frame of character variables. The
number of columns must be equal to the length of |
a matrix of the same dimensions as dat
. The ith entry in the
jth row is 0 if the jth value of vec
is equal to the jth value of
the ith row of dat. It is 1 if they are different. If either the ith
value of the jth row of dat
or the jth value of vec
are
missing, and NA will be returned.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.