eda_add: Add graphical EDA elements to existing plot

View source: R/eda_add.R

eda_addR Documentation

Add graphical EDA elements to existing plot

Description

eda_add adds graphical EDA elements to a scatter plot. Currently only adds eda_rline fit and points.

Usage

eda_add(
  x,
  pch = 24,
  p.col = "darkred",
  p.fill = "yellow",
  lty = 1,
  l.col = "darkred"
)

Arguments

x

Object of class eda_rline

pch

Point symbol type

p.col

Point color passed to col

p.fill

Point fill color passed to bg (Only used for pch ranging from 21-25)

lty

Line type

l.col

Line color

Details

This function adds an eda_rline slope and 3-pt summary points to an existing scatter plot.


See the accompanying vignette Resistant Line for a detailed breakdown of the resistant line technique.

Value

Returns the eda_rline intercept and slope.

  • a: Intercept

  • b: Slope

Examples


eda_lm(mtcars, x = wt, y = mpg)
Mr <- eda_rline(mtcars, x=wt, y=mpg)
eda_add(Mr, l.col = "blue")

mgimond/tukeyedar documentation built on March 19, 2024, 8:44 a.m.