[Xts-commits] r849 - pkg/xtsExtra/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 12 15:34:22 CEST 2014
Author: rossbennett34
Date: 2014-09-12 15:34:21 +0200 (Fri, 12 Sep 2014)
New Revision: 849
Modified:
pkg/xtsExtra/R/plot2.R
Log:
adding warning message if type="h" is specified for multivariate series
Modified: pkg/xtsExtra/R/plot2.R
===================================================================
--- pkg/xtsExtra/R/plot2.R 2014-09-10 18:01:56 UTC (rev 848)
+++ pkg/xtsExtra/R/plot2.R 2014-09-12 13:34:21 UTC (rev 849)
@@ -688,6 +688,8 @@
}
}
} else {
+ if(type == "h" & NCOL(x) > 1)
+ warning("only the univariate series will be plotted")
cs$add(expression(chart.lines(R[xsubset],
type=type,
lty=lty,
@@ -1030,6 +1032,9 @@
xdata <- plot_object$Env$xdata
xsubset <- plot_object$Env$xsubset
+ if(type == "h" & NCOL(xdata) > 1)
+ warning("only the univariate series will be plotted")
+
# add data to the local environment
lenv$xdata <- xdata
lenv$xsubset <- xsubset
More information about the Xts-commits
mailing list