[Xts-commits] r869 - in pkg/xts: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jan 10 16:40:11 CET 2015
Author: rossbennett34
Date: 2015-01-10 16:40:11 +0100 (Sat, 10 Jan 2015)
New Revision: 869
Added:
pkg/xts/man/lines.xts.Rd
pkg/xts/man/points.xts.Rd
Removed:
pkg/xts/man/addPoints.Rd
Modified:
pkg/xts/NAMESPACE
pkg/xts/R/plot.R
Log:
Add S3 methods for lines.xts and points.xts
s/addPoints/points.xts
Modified: pkg/xts/NAMESPACE
===================================================================
--- pkg/xts/NAMESPACE 2015-01-10 14:55:05 UTC (rev 868)
+++ pkg/xts/NAMESPACE 2015-01-10 15:40:11 UTC (rev 869)
@@ -122,9 +122,11 @@
export(plot.xts)
export(addLegend)
export(addEventLines)
-export(addPoints)
+# export(addPoints)
export(addSeries)
S3method(plot,xts)
+S3method(lines,xts)
+S3method(points,xts)
S3method(print, replot_xts)
S3method(plot, replot_xts)
Modified: pkg/xts/R/plot.R
===================================================================
--- pkg/xts/R/plot.R 2015-01-10 14:55:05 UTC (rev 868)
+++ pkg/xts/R/plot.R 2015-01-10 15:40:11 UTC (rev 869)
@@ -865,6 +865,15 @@
plot_object
}
+lines.xts <- function(x, ..., main="", on=NA, col=NULL, lty=1, lwd=1, pch=0){
+ addSeries(x, ...=..., main=main, on=on, type="l", col=col, lty=lty, lwd=lwd, pch=pch)
+}
+
+
+# addPoints <- function(x, main="", on=NA, col=NULL, pch=0, ...){
+# addSeries(x, main=main, on=on, type="p", col=col, pch=pch, ...)
+# }
+
#' Add time series of points to an existing xts plot
#'
#' @param x an xts object to plot.
@@ -874,8 +883,8 @@
#' @param pch the type of plot to be drawn, same as in \code{\link{plot}}.
#' @param \dots any other passthrough parameters. Not currently used.
#' @author Ross Bennett
-addPoints <- function(x, main="", on=NA, col=NULL, pch=0, ...){
- addSeries(x, main=main, on=on, type="p", col=col, pch=pch, ...)
+points.xts <- function(x, ..., main="", on=NA, col=NULL, pch=0){
+ addSeries(x, ...=..., main=main, on=on, type="p", col=col, pch=pch)
}
#' Add vertical lines to an existing xts plot
Deleted: pkg/xts/man/addPoints.Rd
===================================================================
--- pkg/xts/man/addPoints.Rd 2015-01-10 14:55:05 UTC (rev 868)
+++ pkg/xts/man/addPoints.Rd 2015-01-10 15:40:11 UTC (rev 869)
@@ -1,27 +0,0 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
-\name{addPoints}
-\alias{addPoints}
-\title{Add time series of points to an existing xts plot}
-\usage{
-addPoints(x, main = "", on = NA, col = NULL, pch = 0, ...)
-}
-\arguments{
-\item{x}{an xts object to plot.}
-
-\item{main}{main title for a new panel if drawn.}
-
-\item{on}{panel number to draw on. A new panel will be drawn if \code{on=NA}.}
-
-\item{col}{color palette to use, set by default to rational choices.}
-
-\item{pch}{the type of plot to be drawn, same as in \code{\link{plot}}.}
-
-\item{\dots}{any other passthrough parameters. Not currently used.}
-}
-\description{
-Add time series of points to an existing xts plot
-}
-\author{
-Ross Bennett
-}
-
Added: pkg/xts/man/lines.xts.Rd
===================================================================
--- pkg/xts/man/lines.xts.Rd (rev 0)
+++ pkg/xts/man/lines.xts.Rd 2015-01-10 15:40:11 UTC (rev 869)
@@ -0,0 +1,30 @@
+\name{lines.xts}
+\alias{lines.xts}
+\title{Add time series lines to an existing xts plot}
+\usage{
+\method{lines}{xts}(x, ..., main = "", on = NA, col = NULL, lty = 1,
+ lwd = 1, pch = 0)
+}
+\arguments{
+\item{x}{an xts object to plot.}
+
+\item{\dots}{any other passthrough parameters. Not currently used.}
+
+\item{main}{main title for a new panel if drawn.}
+
+\item{on}{panel number to draw on. A new panel will be drawn if \code{on=NA}.}
+
+\item{col}{color palette to use, set by default to rational choices.}
+
+\item{lty}{set the line type, same as in \code{\link{plot}}.}
+
+\item{lwd}{set the line width, same as in \code{\link{plot}}.}
+
+\item{pch}{the type of plot to be drawn, same as in \code{\link{plot}}.}
+}
+\description{
+Add time series lines to an existing xts plot
+}
+\author{
+Ross Bennett
+}
\ No newline at end of file
Added: pkg/xts/man/points.xts.Rd
===================================================================
--- pkg/xts/man/points.xts.Rd (rev 0)
+++ pkg/xts/man/points.xts.Rd 2015-01-10 15:40:11 UTC (rev 869)
@@ -0,0 +1,26 @@
+\name{points.xts}
+\alias{points.xts}
+\title{Add time series of points to an existing xts plot}
+\usage{
+\method{points}{xts}(x, ..., main = "", on = NA, col = NULL, pch = 0)
+}
+\arguments{
+\item{x}{an xts object to plot.}
+
+\item{\dots}{any other passthrough parameters. Not currently used.}
+
+\item{main}{main title for a new panel if drawn.}
+
+\item{on}{panel number to draw on. A new panel will be drawn if \code{on=NA}.}
+
+\item{col}{color palette to use, set by default to rational choices.}
+
+\item{pch}{the type of plot to be drawn, same as in \code{\link{plot}}.}
+}
+\description{
+Add time series of points to an existing xts plot
+}
+\author{
+Ross Bennett
+}
+
More information about the Xts-commits
mailing list