Start with variable which has the largest distance between all other variables. Then add the variable with the largest distance to the already selected variables.

optimal_order(distance, selected = character(0))

Arguments

distance

a square distance matrix

selected

optional vector of preselected variables

Value

a vector variable names