addggregression: Add a regression or loess to an existing ggplot

Description Usage Arguments Value See Also Examples

View source: R/addggregression.R

Description

Add a regression or loess to an existing ggplot

Usage

1
2
addggregression(myplot, doregression = T, doloess = F, span = if (doloess
  == T) {     c(0.5, 1, 1.5, 2) }, colour = "black", ...)

Arguments

myplot

The ggplot object that wants to be annotated with a regression

Value

Returns the pots with the additions

See Also

ggdotscolor

Examples

1
2
3
4
x=rnomr(1,1,100)
y=rnorm(1,2,100)
x=rnorm(1,3,100)
ggdotscolor(x=x,y=y,colorvar=z) %>% addggregression()

MoisesExpositoAlonso/moiR documentation built on Dec. 24, 2021, 10:12 p.m.