[Returnanalytics-commits] r1961 - in pkg/PerformanceAnalytics: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed May 23 21:57:02 CEST 2012
Author: braverock
Date: 2012-05-23 21:57:02 +0200 (Wed, 23 May 2012)
New Revision: 1961
Modified:
pkg/PerformanceAnalytics/R/CoMoments.R
pkg/PerformanceAnalytics/R/chart.RollingRegression.R
pkg/PerformanceAnalytics/R/replaceTabs.R
pkg/PerformanceAnalytics/R/table.RollingPeriods.R
pkg/PerformanceAnalytics/R/textplot.R
pkg/PerformanceAnalytics/man/centeredmoments.Rd
pkg/PerformanceAnalytics/man/chart.RollingRegression.Rd
pkg/PerformanceAnalytics/man/table.RollingPeriods.Rd
pkg/PerformanceAnalytics/man/textplot.Rd
Log:
- fix codoc errors from roxygen conversion
Modified: pkg/PerformanceAnalytics/R/CoMoments.R
===================================================================
--- pkg/PerformanceAnalytics/R/CoMoments.R 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/R/CoMoments.R 2012-05-23 19:57:02 UTC (rev 1961)
@@ -116,6 +116,7 @@
###############################################################################
+#' @rdname centeredmoments
centeredmoment = function(R,power)
{# @author Kris Boudt, Peter Carl
R = checkData(R)
@@ -125,6 +126,7 @@
###############################################################################
+#' @rdname centeredmoments
centeredcomoment = function(Ra,Rb,p1,p2,normalize=FALSE)
{# @author Kris Boudt, Peter Carl, and Brian G. Peterson
Modified: pkg/PerformanceAnalytics/R/chart.RollingRegression.R
===================================================================
--- pkg/PerformanceAnalytics/R/chart.RollingRegression.R 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/R/chart.RollingRegression.R 2012-05-23 19:57:02 UTC (rev 1961)
@@ -25,11 +25,6 @@
#' @param attribute one of "Beta","Alpha","R-Squared" for which attribute to
#' show
#' @param main set the chart title, same as in \code{plot}
-#' @param event.labels TRUE/FALSE whether or not to display lines and labels
-#' for historical market shock events
-#' @param legend.loc places a legend into one of nine locations on the chart:
-#' bottomright, bottom, bottomleft, left, topleft, top, topright, right, or
-#' center.
#' @param na.pad TRUE/FALSE If TRUE it adds any times that would not otherwise
#' have been in the result with a value of NA. If FALSE those times are
#' dropped.
Modified: pkg/PerformanceAnalytics/R/replaceTabs.R
===================================================================
--- pkg/PerformanceAnalytics/R/replaceTabs.R 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/R/replaceTabs.R 2012-05-23 19:57:02 UTC (rev 1961)
@@ -1,9 +1,10 @@
## Function to replace all tabs in a string with an appropriate number of spaces.
-# handle a single character string
+#' @rdname textplot
replaceTabs.inner <- function( text, width=8 )
{
- spaces <- " "
+ # handle a single character string
+ spaces <- " "
if(nchar(text)<1) return(text)
@@ -26,6 +27,7 @@
}
}
+#' @rdname textplot
replaceTabs <- function(text, width=8)
{
text <- as.character(text)
Modified: pkg/PerformanceAnalytics/R/table.RollingPeriods.R
===================================================================
--- pkg/PerformanceAnalytics/R/table.RollingPeriods.R 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/R/table.RollingPeriods.R 2012-05-23 19:57:02 UTC (rev 1961)
@@ -95,6 +95,7 @@
}
+#' @rdname table.RollingPeriods
table.TrailingPeriodsRel <-
function (R, Rb, periods = subset(c(12,36,60), c(12,36,60)
< length(as.matrix(R[,1]))), FUNCS=c("cor","CAPM.beta"), funcs.names = c("Correlation", "Beta"), digits = 4, ...)
Modified: pkg/PerformanceAnalytics/R/textplot.R
===================================================================
--- pkg/PerformanceAnalytics/R/textplot.R 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/R/textplot.R 2012-05-23 19:57:02 UTC (rev 1961)
@@ -105,6 +105,7 @@
UseMethod('textplot')
+#' @rdname textplot
textplot.default <- function(object,
halign=c("center","left","right"),
valign=c("center","top","bottom"),
@@ -133,6 +134,7 @@
}
+#' @rdname textplot
textplot.data.frame <- function(object,
halign=c("center","left","right"),
valign=c("center","top","bottom"),
@@ -164,6 +166,7 @@
wrap.rownames, ... )
}
+#' @rdname textplot
textplot.matrix <- function(object,
halign=c("center","left","right"),
valign=c("center","top","bottom"),
@@ -368,6 +371,7 @@
par(opar)
}
+#' @rdname textplot
textplot.character <- function (object,
halign = c("center", "left", "right"),
valign = c("center", "top", "bottom"),
Modified: pkg/PerformanceAnalytics/man/centeredmoments.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/centeredmoments.Rd 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/man/centeredmoments.Rd 2012-05-23 19:57:02 UTC (rev 1961)
@@ -5,6 +5,10 @@
\title{calculate centered Returns}
\usage{
Return.centered(R, ...)
+
+ centeredmoment(R, power)
+
+ centeredcomoment(Ra, Rb, p1, p2, normalize = FALSE)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
Modified: pkg/PerformanceAnalytics/man/chart.RollingRegression.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/chart.RollingRegression.Rd 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/man/chart.RollingRegression.Rd 2012-05-23 19:57:02 UTC (rev 1961)
@@ -28,13 +28,6 @@
\item{main}{set the chart title, same as in \code{plot}}
- \item{event.labels}{TRUE/FALSE whether or not to display
- lines and labels for historical market shock events}
-
- \item{legend.loc}{places a legend into one of nine
- locations on the chart: bottomright, bottom, bottomleft,
- left, topleft, top, topright, right, or center.}
-
\item{na.pad}{TRUE/FALSE If TRUE it adds any times that
would not otherwise have been in the result with a value
of NA. If FALSE those times are dropped.}
Modified: pkg/PerformanceAnalytics/man/table.RollingPeriods.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/table.RollingPeriods.Rd 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/man/table.RollingPeriods.Rd 2012-05-23 19:57:02 UTC (rev 1961)
@@ -8,6 +8,12 @@
periods = subset(c(12, 36, 60), c(12, 36, 60) < length(as.matrix(R[, 1]))),
FUNCS = c("mean", "sd"),
funcs.names = c("Average", "Std Dev"), digits = 4, ...)
+
+ table.TrailingPeriodsRel(R, Rb,
+ periods = subset(c(12, 36, 60), c(12, 36, 60) < length(as.matrix(R[, 1]))),
+ FUNCS = c("cor", "CAPM.beta"),
+ funcs.names = c("Correlation", "Beta"), digits = 4,
+ ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
Modified: pkg/PerformanceAnalytics/man/textplot.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/textplot.Rd 2012-05-23 19:22:36 UTC (rev 1960)
+++ pkg/PerformanceAnalytics/man/textplot.Rd 2012-05-23 19:57:02 UTC (rev 1961)
@@ -1,5 +1,6 @@
-\name{textplot}
+\name{replaceTabs.inner}
\alias{replaceTabs}
+\alias{replaceTabs.inner}
\alias{textplot}
\alias{textplot.character}
\alias{textplot.data.frame}
@@ -7,6 +8,10 @@
\alias{textplot.matrix}
\title{Display text information in a graphics plot.}
\usage{
+ replaceTabs.inner(text, width = 8)
+
+ replaceTabs(text, width = 8)
+
textplot(object, halign = "center", valign = "center",
cex, max.cex = 1, cmar = 2, rmar = 0.5,
show.rownames = TRUE, show.colnames = TRUE, hadj = 1,
@@ -15,6 +20,49 @@
col.data = par("col"), col.rownames = par("col"),
col.colnames = par("col"), wrap = TRUE,
wrap.colnames = 10, wrap.rownames = 10, ...)
+
+ textplot.default(object,
+ halign = c("center", "left", "right"),
+ valign = c("center", "top", "bottom"), cex, max.cex,
+ cmar, rmar, show.rownames, show.colnames, hadj, vadj,
+ row.valign, heading.valign, mar, col.data,
+ col.rownames, col.colnames, wrap, wrap.colnames,
+ wrap.rownames, ...)
+
+ textplot.data.frame(object,
+ halign = c("center", "left", "right"),
+ valign = c("center", "top", "bottom"), cex,
+ max.cex = 1, cmar = 2, rmar = 0.5,
+ show.rownames = TRUE, show.colnames = TRUE, hadj = 1,
+ vadj = NULL, row.valign = "center",
+ heading.valign = "bottom", mar = c(0, 0, 0, 0) + 0.1,
+ col.data = par("col"), col.rownames = par("col"),
+ col.colnames = par("col"), wrap = TRUE,
+ wrap.colnames = 10, wrap.rownames = 10, ...)
+
+ textplot.matrix(object,
+ halign = c("center", "left", "right"),
+ valign = c("center", "top", "bottom"), cex,
+ max.cex = 1, cmar = 2, rmar = 0.5,
+ show.rownames = TRUE, show.colnames = TRUE, hadj = 1,
+ vadj = NULL, row.valign = "center",
+ heading.valign = "bottom", mar = c(0, 0, 0, 0) + 0.1,
+ col.data = par("col"), col.rownames = par("col"),
+ col.colnames = par("col"), wrap = TRUE,
+ wrap.colnames = 10, wrap.rownames = 10, ...)
+
+ textplot.character(object,
+ halign = c("center", "left", "right"),
+ valign = c("center", "top", "bottom"), cex,
+ max.cex = 1, cmar = 2, rmar = 0.5,
+ show.rownames = TRUE, show.colnames = TRUE, hadj = 1,
+ vadj = NULL, row.valign = "center",
+ heading.valign = "bottom", mar = c(0, 0, 3, 0) + 0.1,
+ col.data = par("col"), col.rownames = par("col"),
+ col.colnames = par("col"), wrap = TRUE,
+ wrap.colnames = 10, wrap.rownames = 10,
+ fixed.width = TRUE, cspace = 1, lspace = 1,
+ tab.width = 8, ...)
}
\arguments{
\item{object}{Object to be displayed.}
More information about the Returnanalytics-commits
mailing list