Skip to contents

Cleans the response transformation variable to the names of the back-transformation functions

Usage

clean_response_transformation(
  response_transformation,
  transformation_tbl = ManyEcoEvo:::transformation_tbl
)

Arguments

response_transformation

A character vector with the response transformation values

transformation_tbl

A tibble of the response transformation values transformation_orig and their cleaned names cleaned_transformation

Value

A character vector of cleaned response transformation values equal to the required transformation values in conversion()

Details

The transformation_tbl is a tibble of the response transformation values transformation_orig and their cleaned names cleaned_transformation. The transformation_orig values are the original response transformation values used by the analyst. The cleaned_transformation values are the cleaned response transformation values that are equal to the required transformation values in conversion(). The user can supply an alternate table of transformations depending on what is required for the back-transformation functions.

Examples

clean_response_transformation("power2", ManyEcoEvo:::transformation_tbl) 
#> Error in flatten_chr(.): could not find function "flatten_chr"
clean_response_transformation("log", ManyEcoEvo:::transformation_tbl)
#> Error in flatten_chr(.): could not find function "flatten_chr"
clean_response_transformation("new_transformation", ManyEcoEvo:::transformation_tbl ) # Returns NA if not found
#> Error in flatten_chr(.): could not find function "flatten_chr"