attribute_similarity: Attribute similarity matrices

View source: R/gais.R

attribute_similarityR Documentation

Attribute similarity matrices

Description

Generate square matrices of similarity between individuals from individual attribute data

Usage

attribute_similarity(attr, type = "discrete")

Arguments

attr

Vector, individual attributes

type

Character, type of similarity to calculate

Details

The available types of similarity are "discrete" for 1-0 similarity, "absdiff" for negative absolute difference, and "sqdiff" for negative squared difference. If the attribute data is not numeric, the function will default to "discrete".

Value

A square matrix of similarity values


MNWeiss/aninet documentation built on Jan. 31, 2023, 3:55 a.m.