convert_alternative("two_sided")[1] "two.sided"
convert_alternative("lesser")[1] "less"
Functions in this package use the values "two_sided", "greater", and "lesser" for the alternative hypothesis. The functions in the stats package (e.g., stats::binom.test()) use "two.sided", "greater", and "less". This helper validates the value and converts it.
convert_alternative(alternative, call = rlang::caller_env())| Arguments | Description |
|---|---|
| alternative | A single character string: one of "two_sided", "greater", or "lesser". |
| call | The execution environment used in error messages. |
A single character string: one of "two.sided", "greater", or "less".