explore_best_mix: Exploratory analysis for choosing mixing parameter

Description Usage Arguments Value

View source: R/cluster_yields.R

Description

Exploratory analysis for choosing mixing parameter

Usage

1
2
3
4
5
6
7
explore_best_mix(
  processed_data,
  cluster_number,
  range = seq(0, 0.5, 0.1),
  plot = TRUE,
  output_path = NULL
)

Arguments

processed_data

sf; An sf object likely returned from make_cluster_data. Object should include the features to be clustered and their associated polygon geometries.

cluster_number

integer; number of clusters to be used.

range

numeric; **optional** range of mixing parameters to consider. These values are passed as the alpha parameter in ClustGeo::hclustgeo and ClustGeo::choicealpha. The values must be between 0 and 1, the default is seq(0, 0.5, 0.1).

plot

logical; **optional** should plot be returned in the current graphics device (likely in RStudio). Default is TRUE.

output_path

string; **optional** path where plot should be saved. Default is NULL. If path is provided, PDFs with the names "mixing_parameters_map_k_clusters" and "mixing_parameters_plot_k_clusters" will be created, where k is the integer passed to cluster_number.

Value

Two plots are returned. The first is the output from ClustGeo::choicealpha and the second is a faceted plot showing the field cluster results for each level of alpha in range. This information should be used to choose a value for the mixing paramters (alpha).


smmueller/plotdesignr documentation built on Jan. 5, 2022, 10:55 a.m.