Skip to contents

Compute dissimilarity between pair of countries Calculate pairwise dissimilarities and convert the output to matrix.

Usage

compute_dissimilarity(wdi_data, index = NULL, metric = "euclidean")

Arguments

wdi_data

A data frame of the indicator data generated by get_wdi_data

index

An optional character string specifying the indicator code Defaults to NULL

metric

A character string specifying the dissimilarity metric to use Defaults to "euclidean" and uses the daisy() function which handles missing values.

Value

A matrix of pairwise dissimilarities between countries.

Examples

pm_diss_mat <- compute_dissimilarity(pm_data)