[R-gregmisc-commits] r2083 - pkg/gplots/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 8 17:21:16 CET 2016


Author: warnes
Date: 2016-03-08 17:21:15 +0100 (Tue, 08 Mar 2016)
New Revision: 2083

Added:
   pkg/gplots/R/plot.lowess.R
Log:
Add function to plot points and lowess using formula interface.

Added: pkg/gplots/R/plot.lowess.R
===================================================================
--- pkg/gplots/R/plot.lowess.R	                        (rev 0)
+++ pkg/gplots/R/plot.lowess.R	2016-03-08 16:21:15 UTC (rev 2083)
@@ -0,0 +1,10 @@
+plot.lowess <- function (formula, data = parent.frame(), ..., subset=parent.frame(), col.lowess="red", lty.lowess=2  )
+{
+  m <- match.call(expand.dots=TRUE)
+  m[[1]] <- as.name("plot")
+  eval(m)
+  m[[1]] <- as.name("lowess")
+  lw <- eval(m)
+  lines(lw, col=col.lowess, lty=lty.lowess)  
+  grid()
+}



More information about the R-gregmisc-commits mailing list