clean_emmeans_specs: Helper function to clean one-sided formulas for emmeans

Description Usage Arguments Value

Description

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.

Usage

1

Arguments

specs

the specs input to process

Value

a two-sided formula with the LHS being 'pairwise' if the input is a formula, otherwise return original input


lengning/gClinBiomarker documentation built on May 9, 2019, 2:55 p.m.