Generate best guess of height for each taxa*context

add_height(
  df,
  context = "cell",
  env_prcomp,
  lustr,
  lustr_col = "ht",
  ht_func = max
)

Arguments

df

Dataframe with context, taxa and height columns.

context

Character. Name of columns defining context.

env_prcomp

List. Result from call to envClean::env_pca()

lustr

Dataframe. Lookup from lifeform to numeric height values

lustr_col

Character. Name of column in lustr containing height values to use for any lifeform

ht_func

Function to summarise height values for any context with more than one cover value.

Value

Dataframe with cov_col removed and replaced with best guess height in column use_height