Skip to contents

Generates subsets of data with different combinations of outliers removed for different exclusion_sets.

Usage

generate_exclusion_subsets(ManyEcoEvo, estimate_type = NULL)

Arguments

ManyEcoEvo

A dataframe containing at minimum the character column dataset and list-columns data and diversity_data.

estimate_type

character vector, one of "Zr", "yi", "y25", "y50", "y75", NULL.

Value

A dataframe grouped by dataset and exclusion_set that contains subsets of data and diversity_data based on exclusion criteria functions defined in subset_fns_Zr() and subset_funs_yi(), and the estimate_type column.

Details

If estimate_type is NULL, the column estimate_type must be in ManyEcoEvo.

This function uses the functions subset_fns_Zr() and []subset_fns_yi() to create named lists with elements containing purrr::-style lambda functions, whose element name is the name of the function.

If NULL is provided to the argument estimate_type, then the column estimate_type must exist in ManyEcoEvo, as this column will be used to filter the exclusion criteria functions.

The value of column exclusion_set in the returned object will be the name of the exclusion criteria function, with the prefix "subset_" removed, derived from either subset_fns_Zr() or subset_funs_yi(), depending on the estimate_type.

Note: This function should be exectued after prepare_response_variables() and generate_yi_subsets().