[Blotter-commits] r1112 - pkg/quantstrat/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 31 21:13:22 CEST 2012


Author: opentrades
Date: 2012-07-31 21:13:22 +0200 (Tue, 31 Jul 2012)
New Revision: 1112

Modified:
   pkg/quantstrat/R/tradeGraphs.R
Log:
require(rgl) nows check for result and throws an error if fails

Modified: pkg/quantstrat/R/tradeGraphs.R
===================================================================
--- pkg/quantstrat/R/tradeGraphs.R	2012-07-31 19:03:41 UTC (rev 1111)
+++ pkg/quantstrat/R/tradeGraphs.R	2012-07-31 19:13:22 UTC (rev 1112)
@@ -24,7 +24,7 @@
         # TODO: fix axes to use non scientific notation
         # TODO: fix use of full rainbow for small fractions (eg. Profit.Factor, now only uses red)
 
-        require(rgl)
+	if(!require(rgl, quietly=TRUE))	stop('The "rgl" package is required to use this function')
 
         if(missing(stats))      stop('stats undefined')
 



More information about the Blotter-commits mailing list