Use a set of (continuous) columns to choose a good set of rows

make_metric_df(
  df,
  mets_df = tibble::tibble(metric = "av_clust_size", high_good = TRUE, summary_mets =
    TRUE, weight = 1),
  context = c("method", "groups"),
  mets_col = "summary_mets",
  summarise_method = median,
  top_thresh = 0.25,
  best_thresh = 5,
  scale = lifecycle::deprecated(),
  level = lifecycle::deprecated()
)

Arguments

df

Dataframe with columns over which to find good rows

mets_df

Dataframe mapping the name of possible metrics to cases (columns) in which to use that metric.

context

Character. Name of columns in df that define context.

mets_col

Character. Name of mets_df column to use in this instance.

summarise_method

Character. Name of method to use in summarising if there is more than one row per context.

top_thresh

Numeric specifying the proportion of rows considered 'top'.

best_thresh

Numeric specifying the absolute number of rows considered 'best'.