[Returnanalytics-commits] r2406 - pkg/PortfolioAnalytics/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jun 23 20:15:06 CEST 2013


Author: rossbennett34
Date: 2013-06-23 20:15:06 +0200 (Sun, 23 Jun 2013)
New Revision: 2406

Modified:
   pkg/PortfolioAnalytics/R/constraints.R
Log:
added missing paren to fix bug in get.constraints

Modified: pkg/PortfolioAnalytics/R/constraints.R
===================================================================
--- pkg/PortfolioAnalytics/R/constraints.R	2013-06-23 15:42:07 UTC (rev 2405)
+++ pkg/PortfolioAnalytics/R/constraints.R	2013-06-23 18:15:06 UTC (rev 2406)
@@ -463,7 +463,7 @@
   if(length(out) == 0) stop("No constraints are enabled")
   
   # Error if required constraints are not specified
-  if(is.null(out$min) | is.null(out$max) | is.null(out$max_sum) | is.null(out$min_sum) {
+  if(is.null(out$min) | is.null(out$max) | is.null(out$max_sum) | is.null(out$min_sum)) {
     stop("Must specify weight_sum constraints (min_sum and max_sum) and box constraints ( min and max")
   }
   return(structure(out, class="constraint"))



More information about the Returnanalytics-commits mailing list