pl.smgg: Plot scatter plots with smooth line for a data frame using ggplot2
Description
Plotting scatter plots for a data frame using ggplot2, with titles and label numbers. A smooth line will be added using a chosen method. The output will be 4 graphs per page.
Usage
pl.smgg(x,dependent,l,mtd)
Arguments
x
:a data frame, which includes the dependent variable
dependent
:the dependent variable for scatter plot
l
:the beginning label number in the title (default set to 1)
mtd
:sommthing method to use, accepts either a character vector or a function, e.g. MASS::rlm, base::lm, base::loess, mgcv::gam