Learn R Programming

emcAdr (version 1.2)

get_dissimilarity_from_cocktail_list: Recover the square matrix of distance between cocktails where the index (i,j) of the matrix is the distance between cocktails i and j in an arbitrary cocktail list

Description

Recover the square matrix of distance between cocktails where the index (i,j) of the matrix is the distance between cocktails i and j in an arbitrary cocktail list

Usage

get_dissimilarity_from_cocktail_list(cocktails, ATCtree, normalization = TRUE)

Value

The square matrix of distances between cocktails

Arguments

cocktails

: A list of cocktails in the form of a vector of integer

ATCtree

: ATC tree with upper bound of the DFS (without the root)

normalization

: Do we keep the distance between cocktail in the range [0;1] ?

Examples

Run this code
# \donttest{
data("ATC_Tree_UpperBound_2024")

cocktails = list(c(561, 904),
               c(1902, 4585)) # only size 2 cocktails allowed for this function

distance_matrix = get_dissimilarity_from_cocktail_list(cocktails = cocktails,
                              ATCtree = ATC_Tree_UpperBound_2024, 
                              normalization = TRUE)
# }

Run the code above in your browser using DataLab