sma_plot plot sma correlation analysis add regression line and add r2

sma_plot(datf, xvar, yvar)

Arguments

datf

a dataframe, include columns x and y

xvar

unquoted string for column name x

yvar

unquoted string for column name y

Value

a ggplot with regression line and r2 text

Author

Tien-Cheng Wang

Examples

sma_plot(mtcars,xvar=mpg,yvar = cyl)