Clustering of environments using a K-means algorithm based on:

  1. Only climate variables

  2. Only soil variables

  3. All environmental data together

clustering_env_data(weather_ECs = NULL, soil_ECs = NULL, path_plots = NULL)

Arguments

weather_ECs

a data.frame with climate-based covariates (predictor variables) with three columns year, location and IDenv. Default can be NULL, if no weather-based data available/should be used.

soil_ECs

a data.frame with soil-based covariates (predictor variables) with three columns year, location and IDenv. Default can be NULL, if no soil data available.

path_plots

character Path where clustering plots should be saved.

k

numeric Number of clusters to use.

Value

Plots showing how the environments cluster based on weather-, soil- and all environmental data, for different k numbers. Metrics such as the Silhouette score or the sum of squares score are also provided.

Author

Cathy C. Westhues cathy.jubin@uni-goettingen.de