Learn R Programming

thectar (version 1.0.0)

simicount: Similarity matrix by counting (simicount)

Description

simicount calculates a similarity matrix for sorting data.

Usage

simicount(data)

Arguments

data

Dataset; one row represents one sorting, objects in one pile must have the same number.

Value

Similarity matrix.

Details

This function is applicable to sorting data. It creates a similarity matrix showing how often two objects were in the same pile. Each line of the dataset should refer to one sorting. The first column of the input matrix should contain the ID of the sorting; the following columns refer to the objects that have been sorted. The allocation of objects to piles is indicated with numbers; for each line, the objects that were sorted into the same pile are given the same number (e.g. all objects with a "1" are in one pile, all objects with a "2" are in one pile, etc.). This function does not work with missing values.

Examples

Run this code
# NOT RUN {
## Calculating similarities using sorted data
data(SDG_grouping)
similarities <- simicount(SDG_grouping)
head(similarities)
# }

Run the code above in your browser using DataLab