Description Usage Arguments Value
The emmeans::emmeans()
function broke a golden rule: they
return a different class of data based on unrelated parameters. In this
case, if the specs
parameter is a one-sided formula it returns a
emmGrid
whereas if it's two-sided for a list, it returns a
emm_list
. This makes it quite hard to work with reliably. To address
this, this helper function cleans the inputs before handing them off to
specs
to make a one sided formula (like ~ x + y
) into an
acceptable two-sided formula (like pairwise ~ x + y
), allowing
emmeans to be used and always producing a single class of output.
1 | clean_emmeans_specs(specs)
|
specs |
the specs input to process |
a two-sided formula with the LHS being 'pairwise' if the input is a formula, otherwise return original input
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.