Skip to contents

Add explanatory (environmental) variables to 'site' dataframe.

Usage

make_env_clust_df(
  df,
  clust_col = "cluster",
  context = "cell",
  min_sites = min_abs_sites,
  df_env,
  add_clust = NULL,
  add_clust_col = "cluster",
  add_env,
  env_cols,
  set_min = FALSE
)

Arguments

df

Dataframe with context and 'cluster' columns.

clust_col

Name of cluster column.

context

Name of columns describing the context.

min_sites

Minimum number of sites preferred in a cluster.

df_env

Dataframe with 'site' and associated env values for floristic 'sites'.

add_clust

Any additional clusters (i.e. clusters not generated by floristics such as land cover 'clusters')

add_clust_col

Character name of column in add_clust with 'clusters'.

add_env

Dataframe with 'site' and associated env values for additionalClusters 'sites'.

env_cols

Names of the columns containing the env variables.

set_min

Filter clusters those with 'sites' >= minsites

Value

Dataframe of context columns, clustCol and envCols with rows from both dfenv and addenv.