
Clean response transformation variable
Source:R/clean_response_transformation.R
clean_response_transformation.RdCleans 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_origand their cleaned namescleaned_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.
See also
To be called after to assign_transformation_type()
Other Back-transformation:
assign_transformation_type(),
back,
back_transform_response_vars_yi(),
conversion(),
conversion_2(),
convert_predictions(),
rename_prediction_cols()
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"