[Returnanalytics-commits] r3156 - in pkg/PortfolioAnalytics: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Sep 22 23:28:09 CEST 2013
Author: rossbennett34
Date: 2013-09-22 23:28:08 +0200 (Sun, 22 Sep 2013)
New Revision: 3156
Removed:
pkg/PortfolioAnalytics/man/print.optimize.portfolio.DEoptim.Rd
pkg/PortfolioAnalytics/man/print.optimize.portfolio.GenSA.Rd
pkg/PortfolioAnalytics/man/print.optimize.portfolio.ROI.Rd
pkg/PortfolioAnalytics/man/print.optimize.portfolio.pso.Rd
pkg/PortfolioAnalytics/man/print.optimize.portfolio.random.Rd
Modified:
pkg/PortfolioAnalytics/R/generics.R
pkg/PortfolioAnalytics/man/chart.Weights.Rd
pkg/PortfolioAnalytics/man/print.efficient.frontier.Rd
pkg/PortfolioAnalytics/man/print.portfolio.Rd
Log:
Updating documentation for print methods. Collapsing print.optimize.portfolio.* to print.optimize.portfolio for documentation entries.
Modified: pkg/PortfolioAnalytics/R/generics.R
===================================================================
--- pkg/PortfolioAnalytics/R/generics.R 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/R/generics.R 2013-09-22 21:28:08 UTC (rev 3156)
@@ -45,11 +45,11 @@
#'
#' Print method for objects of class \code{portfolio} created with \code{\link{portfolio.spec}}
#'
-#' @param x object of class \code{portfolio}
+#' @param x an object of class \code{portfolio}
#' @param \dots any other passthru parameters
#' @author Ross Bennett
#' @method print portfolio
-#' @export
+#' @S3method print portfolio
print.portfolio <- function(x, ...){
if(!is.portfolio(x)) stop("object passed in is not of class 'portfolio'")
@@ -244,22 +244,28 @@
#' @param \dots any other passthru parameters
#' @author Ross Bennett
#' @method print constraint
-#' @export
+#' @S3method print constraint
print.constraint <- function(x, ...){
print.default(x, ...)
}
-#' Printing Output of optimize.portfolio
+#' Printing output of optimize.portfolio
#'
-#' print method for optimize.portfolio.ROI
+#' print method for optimize.portfolio objects
#'
-#' @param x an object of class \code{optimize.portfolio.ROI} resulting from a call to \code{\link{optimize.portfolio}}
-#' @param ... any other passthru parameters
+#' @param x an object used to select a method
+#' @param \dots any other passthru parameters
#' @param digits the number of significant digits to use when printing.
#' @author Ross Bennett
+#' @aliases print.optimize.portfolio.ROI,
+#' print.optimize.portfolio.random,
+#' print.optimize.portfolio.DEoptim,
+#' print.optimize.portfolio.GenSA,
+#' print.optimize.portfolio.pso
+#' @rdname print.optimize.portfolio
#' @method print optimize.portfolio.ROI
-#' @export
-print.optimize.portfolio.ROI <- function(x, ..., digits = max(3, getOption("digits") - 3)){
+#' @S3method print optimize.portfolio.ROI
+print.optimize.portfolio.ROI <- function(x, ..., digits=4){
cat(rep("*", 35) ,"\n", sep="")
cat("PortfolioAnalytics Optimization\n")
cat(rep("*", 35) ,"\n", sep="")
@@ -296,17 +302,11 @@
cat("\n")
}
-#' Printing Output of optimize.portfolio
-#'
-#' print method for optimize.portfolio.random
-#'
-#' @param x an object of class \code{optimize.portfolio.random} resulting from a call to \code{\link{optimize.portfolio}}
-#' @param ... any other passthru parameters
-#' @param digits the number of significant digits to use when printing.
-#' @author Ross Bennett
+
+#' @rdname print.optimize.portfolio
#' @method print optimize.portfolio.random
-#' @export
-print.optimize.portfolio.random <- function(x, ..., digits=max(3, getOption("digits")-3)){
+#' @S3method print optimize.portfolio.random
+print.optimize.portfolio.random <- function(x, ..., digits=4){
cat(rep("*", 35) ,"\n", sep="")
cat("PortfolioAnalytics Optimization\n")
cat(rep("*", 35) ,"\n", sep="")
@@ -334,7 +334,7 @@
cat(names(tmpl), ":\n")
tmpv <- unlist(tmpl)
names(tmpv) <- names(x$weights)
- print(tmpv)
+ print(tmpv, digits=digits)
cat("\n")
}
}
@@ -343,17 +343,11 @@
cat("\n")
}
-#' Printing Output of optimize.portfolio
-#'
-#' print method for optimize.portfolio.DEoptim
-#'
-#' @param x an object of class \code{optimize.portfolio.DEoptim} resulting from a call to \code{\link{optimize.portfolio}}
-#' @param ... any other passthru parameters
-#' @param digits the number of significant digits to use when printing.
-#' @author Ross Bennett
+
+#' @rdname print.optimize.portfolio
#' @method print optimize.portfolio.DEoptim
-#' @export
-print.optimize.portfolio.DEoptim <- function(x, ..., digits=max(3, getOption("digits")-3)){
+#' @S3method print optimize.portfolio.DEoptim
+print.optimize.portfolio.DEoptim <- function(x, ..., digits=4){
cat(rep("*", 35) ,"\n", sep="")
cat("PortfolioAnalytics Optimization\n")
cat(rep("*", 35) ,"\n", sep="")
@@ -381,7 +375,7 @@
cat(names(tmpl), ":\n")
tmpv <- unlist(tmpl)
names(tmpv) <- names(x$weights)
- print(tmpv)
+ print(tmpv, digits=digits)
cat("\n")
}
}
@@ -390,17 +384,11 @@
cat("\n")
}
-#' Printing Output of optimize.portfolio
-#'
-#' print method for optimize.portfolio.GenSA
-#'
-#' @param x an object of class \code{optimize.portfolio.GenSA} resulting from a call to \code{\link{optimize.portfolio}}
-#' @param ... any other passthru parameters
-#' @param digits the number of significant digits to use when printing
-#' @author Ross Bennett
+
+#' @rdname print.optimize.portfolio
#' @method print optimize.portfolio.GenSA
-#' @export
-print.optimize.portfolio.GenSA <- function(x, ..., digits=max(3, getOption("digits")-3)){
+#' @S3method print optimize.portfolio.GenSA
+print.optimize.portfolio.GenSA <- function(x, ..., digits=4){
cat(rep("*", 35) ,"\n", sep="")
cat("PortfolioAnalytics Optimization\n")
cat(rep("*", 35) ,"\n", sep="")
@@ -428,7 +416,7 @@
cat(names(tmpl), ":\n")
tmpv <- unlist(tmpl)
names(tmpv) <- names(x$weights)
- print(tmpv)
+ print(tmpv, digits=digits)
cat("\n")
}
}
@@ -437,17 +425,11 @@
cat("\n")
}
-#' Printing Output of optimize.portfolio
-#'
-#' print method for optimize.portfolio.pso
-#'
-#' @param x an object of class \code{optimize.portfolio.pso} resulting from a call to \code{\link{optimize.portfolio}}
-#' @param ... any other passthru parameters
-#' @param digits the number of significant digits to use when printing.
-#' @author Ross Bennett
+
+#' @rdname print.optimize.portfolio
#' @method print optimize.portfolio.pso
-#' @export
-print.optimize.portfolio.pso <- function(x, ..., digits=max(3, getOption("digits")-3)){
+#' @S3method print optimize.portfolio.pso
+print.optimize.portfolio.pso <- function(x, ..., digits=4){
cat(rep("*", 35) ,"\n", sep="")
cat("PortfolioAnalytics Optimization\n")
cat(rep("*", 35) ,"\n", sep="")
@@ -475,7 +457,7 @@
cat(names(tmpl), ":\n")
tmpv <- unlist(tmpl)
names(tmpv) <- names(x$weights)
- print(tmpv)
+ print(tmpv, digits=digits)
cat("\n")
}
}
@@ -707,10 +689,10 @@
#' efficient frontier was created or extracted.
#'
#' @param x objective of class \code{efficient.frontier}
-#' @param ... passthrough parameters
+#' @param \dots any other passthru parameters
#' @author Ross Bennett
#' @method print efficient.frontier
-#' @export
+#' @S3method print efficient.frontier
print.efficient.frontier <- function(x, ...){
if(!inherits(x, "efficient.frontier")) stop("object passed in is not of class 'efficient.frontier'")
Modified: pkg/PortfolioAnalytics/man/chart.Weights.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/chart.Weights.Rd 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/man/chart.Weights.Rd 2013-09-22 21:28:08 UTC (rev 3156)
@@ -1,4 +1,4 @@
-\name{chart.Weights.optimize.portfolio.DEoptim}
+\name{chart.Weights}
\alias{chart.Weights}
\alias{chart.Weights.opt.list}
\alias{chart.Weights.optimize.portfolio.DEoptim}
Modified: pkg/PortfolioAnalytics/man/print.efficient.frontier.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/print.efficient.frontier.Rd 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/man/print.efficient.frontier.Rd 2013-09-22 21:28:08 UTC (rev 3156)
@@ -7,7 +7,7 @@
\arguments{
\item{x}{objective of class \code{efficient.frontier}}
- \item{...}{passthrough parameters}
+ \item{\dots}{any other passthru parameters}
}
\description{
Print method for efficient frontier objects. Display the
Deleted: pkg/PortfolioAnalytics/man/print.optimize.portfolio.DEoptim.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/print.optimize.portfolio.DEoptim.Rd 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/man/print.optimize.portfolio.DEoptim.Rd 2013-09-22 21:28:08 UTC (rev 3156)
@@ -1,24 +0,0 @@
-\name{print.optimize.portfolio.DEoptim}
-\alias{print.optimize.portfolio.DEoptim}
-\title{Printing Output of optimize.portfolio}
-\usage{
- \method{print}{optimize.portfolio.DEoptim} (x, ...,
- digits = max(3, getOption("digits") - 3))
-}
-\arguments{
- \item{x}{an object of class
- \code{optimize.portfolio.DEoptim} resulting from a call
- to \code{\link{optimize.portfolio}}}
-
- \item{...}{any other passthru parameters}
-
- \item{digits}{the number of significant digits to use
- when printing.}
-}
-\description{
- print method for optimize.portfolio.DEoptim
-}
-\author{
- Ross Bennett
-}
-
Deleted: pkg/PortfolioAnalytics/man/print.optimize.portfolio.GenSA.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/print.optimize.portfolio.GenSA.Rd 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/man/print.optimize.portfolio.GenSA.Rd 2013-09-22 21:28:08 UTC (rev 3156)
@@ -1,24 +0,0 @@
-\name{print.optimize.portfolio.GenSA}
-\alias{print.optimize.portfolio.GenSA}
-\title{Printing Output of optimize.portfolio}
-\usage{
- \method{print}{optimize.portfolio.GenSA} (x, ...,
- digits = max(3, getOption("digits") - 3))
-}
-\arguments{
- \item{x}{an object of class
- \code{optimize.portfolio.GenSA} resulting from a call to
- \code{\link{optimize.portfolio}}}
-
- \item{...}{any other passthru parameters}
-
- \item{digits}{the number of significant digits to use
- when printing}
-}
-\description{
- print method for optimize.portfolio.GenSA
-}
-\author{
- Ross Bennett
-}
-
Deleted: pkg/PortfolioAnalytics/man/print.optimize.portfolio.ROI.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/print.optimize.portfolio.ROI.Rd 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/man/print.optimize.portfolio.ROI.Rd 2013-09-22 21:28:08 UTC (rev 3156)
@@ -1,24 +0,0 @@
-\name{print.optimize.portfolio.ROI}
-\alias{print.optimize.portfolio.ROI}
-\title{Printing Output of optimize.portfolio}
-\usage{
- \method{print}{optimize.portfolio.ROI} (x, ...,
- digits = max(3, getOption("digits") - 3))
-}
-\arguments{
- \item{x}{an object of class \code{optimize.portfolio.ROI}
- resulting from a call to
- \code{\link{optimize.portfolio}}}
-
- \item{...}{any other passthru parameters}
-
- \item{digits}{the number of significant digits to use
- when printing.}
-}
-\description{
- print method for optimize.portfolio.ROI
-}
-\author{
- Ross Bennett
-}
-
Deleted: pkg/PortfolioAnalytics/man/print.optimize.portfolio.pso.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/print.optimize.portfolio.pso.Rd 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/man/print.optimize.portfolio.pso.Rd 2013-09-22 21:28:08 UTC (rev 3156)
@@ -1,24 +0,0 @@
-\name{print.optimize.portfolio.pso}
-\alias{print.optimize.portfolio.pso}
-\title{Printing Output of optimize.portfolio}
-\usage{
- \method{print}{optimize.portfolio.pso} (x, ...,
- digits = max(3, getOption("digits") - 3))
-}
-\arguments{
- \item{x}{an object of class \code{optimize.portfolio.pso}
- resulting from a call to
- \code{\link{optimize.portfolio}}}
-
- \item{...}{any other passthru parameters}
-
- \item{digits}{the number of significant digits to use
- when printing.}
-}
-\description{
- print method for optimize.portfolio.pso
-}
-\author{
- Ross Bennett
-}
-
Deleted: pkg/PortfolioAnalytics/man/print.optimize.portfolio.random.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/print.optimize.portfolio.random.Rd 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/man/print.optimize.portfolio.random.Rd 2013-09-22 21:28:08 UTC (rev 3156)
@@ -1,24 +0,0 @@
-\name{print.optimize.portfolio.random}
-\alias{print.optimize.portfolio.random}
-\title{Printing Output of optimize.portfolio}
-\usage{
- \method{print}{optimize.portfolio.random} (x, ...,
- digits = max(3, getOption("digits") - 3))
-}
-\arguments{
- \item{x}{an object of class
- \code{optimize.portfolio.random} resulting from a call to
- \code{\link{optimize.portfolio}}}
-
- \item{...}{any other passthru parameters}
-
- \item{digits}{the number of significant digits to use
- when printing.}
-}
-\description{
- print method for optimize.portfolio.random
-}
-\author{
- Ross Bennett
-}
-
Modified: pkg/PortfolioAnalytics/man/print.portfolio.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/print.portfolio.Rd 2013-09-22 21:27:01 UTC (rev 3155)
+++ pkg/PortfolioAnalytics/man/print.portfolio.Rd 2013-09-22 21:28:08 UTC (rev 3156)
@@ -5,7 +5,7 @@
\method{print}{portfolio} (x, ...)
}
\arguments{
- \item{x}{object of class \code{portfolio}}
+ \item{x}{an object of class \code{portfolio}}
\item{\dots}{any other passthru parameters}
}
More information about the Returnanalytics-commits
mailing list