[R-gregmisc-commits] r2124 - pkg/gplots/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 30 17:29:44 CEST 2016


Author: warnes
Date: 2016-03-30 17:29:44 +0200 (Wed, 30 Mar 2016)
New Revision: 2124

Modified:
   pkg/gplots/man/lowess.Rd
Log:
Add tests of non-standard evaluation for lowess() and plotLowess().

Modified: pkg/gplots/man/lowess.Rd
===================================================================
--- pkg/gplots/man/lowess.Rd	2016-03-30 14:19:37 UTC (rev 2123)
+++ pkg/gplots/man/lowess.Rd	2016-03-30 15:29:44 UTC (rev 2124)
@@ -120,5 +120,27 @@
 # formula method: calculate and plot in a single command
 #
 plotLowess(dist ~ speed, data=cars, main="lowess(cars)")
+
+\dontshow{
+# test non-standard evaluation
+
+with(cars, plotLowess(dist ~ speed, main="lowess(cars)") )
+with(cars, plot(lowess(dist ~ speed, main="lowess(cars)") ) )
+
+idx <- cars$speed > 10
+plotLowess(dist[idx] ~ speed[idx], data=cars, main="lowess(cars)")
+plot(lowess(dist[idx] ~ speed[idx], data=cars, main="lowess(cars)"))
+
+with(cars, plotLowess(dist[idx] ~ speed[idx], main="lowess(cars)") )
+with(cars, plot(lowess(dist[idx] ~ speed[idx], main="lowess(cars)") ))
+
+local({
+dist <- cars$dist
+speed <- cars$speed
+plotLowess(dist[idx] ~ speed[idx], main="lowess(cars)")
+plot(lowess(dist[idx] ~ speed[idx], main="lowess(cars)"))
+})
+} % dontshow
+
 }
 \keyword{smooth}



More information about the R-gregmisc-commits mailing list