Learn R Programming

ggpmisc (version 0.6.3)

guess_orientation: Guess the orientation from model formula

Description

Guess the orientation from model formula

Usage

guess_orientation(
  orientation = NULL,
  formula = NULL,
  default.formula = y ~ x,
  formula.on.x = FALSE
)

Value

Named list with members formula and orientation.

Arguments

orientation

character "x" or "y".

formula

model formula based on x and y.

formula.on.x

logical Flip x and y in formula, used when the x and y in data are not flipped in the compute function.

Details

Set defaults for both orientation and formula, ensuring consistency both when x and y and swapped in data and when they are not.