Aids the eye in seeing patterns in the presence of overplotting.

e_lm(e, formula, name = NULL, legend = TRUE, symbol = "none",
  smooth = TRUE, ...)

e_glm(e, formula, name = NULL, legend = TRUE, symbol = "none",
  smooth = TRUE, ...)

e_loess(e, formula, name = NULL, legend = TRUE, symbol = "none",
  smooth = TRUE, x.index = 0, y.index = 0, ...)

Arguments

e

An echarts4r object as returned by e_charts.

formula

formula to pass to lm.

name

name of the serie.

legend

Whether to add serie to legend.

symbol

Symbol to use in e_line.

smooth

Whether to smooth the line.

...

Additional arguments to pass to e_line.

x.index

Indexes of x and y axis.

y.index

Indexes of x and y axis.

Examples

mtcars %>% e_charts(mpg) %>% e_scatter(qsec) %>% e_lm(qsec ~ mpg, name = "y = ax + b") mtcars %>% e_charts(disp) %>% e_scatter(mpg) %>% e_loess(mpg ~ disp) CO2 %>% e_charts(conc) %>% e_scatter(uptake) %>% e_glm(uptake ~ conc, name = "GLM")