pl.smgg {YRmisc} | R Documentation |
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 |
Examples
pl.smgg(mtcars,"mpg",1,lm)
pl.smgg(mtcars,"mpg",1,loess)
[Package YRmisc version 0.1.6 Index]