[Blotter-commits] r677 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 11 21:20:02 CEST 2011
Author: braverock
Date: 2011-07-11 21:20:01 +0200 (Mon, 11 Jul 2011)
New Revision: 677
Modified:
pkg/quantstrat/R/parameters.R
Log:
- fix roxygen problems (mostly export)
- stringsAsFactors=FALSE in expand.grid for applyParameters
Modified: pkg/quantstrat/R/parameters.R
===================================================================
--- pkg/quantstrat/R/parameters.R 2011-07-11 01:37:17 UTC (rev 676)
+++ pkg/quantstrat/R/parameters.R 2011-07-11 19:20:01 UTC (rev 677)
@@ -7,7 +7,7 @@
#' @param label
#' @param ...
#' @param store
-# @export
+#' @export
add.parameter <-
function (strategy,
type = c('indicator','signal'),
@@ -74,7 +74,7 @@
#' @param type
#' @param name
#' @param paramTable
-# @export
+#' @export
add.paramLookupTable <- function(strategy, type, name, paramTable){
assign(paste(strategy,type,name,'table',pos=.strategy),paramTable)
}
@@ -126,8 +126,6 @@
#' Extract the parameter structure from a strategy object.
#' @param strategy The name of the strategy
#' @param staticSwitch
-#' @returnType
-#' @return
#' @author CCD
#' @export
getParameterTable<-function (strategy,staticSwitch){
@@ -203,8 +201,6 @@
#' @param distribution
#' @param weight
#' @param psindex
-#' @returnType
-#' @return
#' @author Yu Chen
#' @export
setParameterDistribution<-function(paramDist=NULL,type=NULL,indexnum=0,distribution=NULL,weight,label,psindex=NULL){#All is needed, set to illegal values
@@ -249,8 +245,6 @@
#' @param parameterPool a paramter set object include all the parameter legal values and distribution/weights.
#' @param method string 'expand' or 'random' how to generate samples of parameters.
#' @param sampleSize
-#' @returnType
-#' @return
#' @author Yu Chen
#' @export
applyParameter<-function(strategy,portfolios,parameterPool,parameterConstrains,method,sampleSize){
@@ -295,7 +289,7 @@
if (method=='expand')
{
- paramTable<-expand.grid(paramdist)
+ paramTable<-expand.grid(paramdist, stringsAsFactors=FALSE)
}
else if (method=='random')
{
@@ -597,8 +591,6 @@
#' @param constrainlabel
#' @param paramList
#' @param relationship
-#' @returnType
-#' @return
#' @author CCD
#' @export
setParameterConstraint<-function(paramConstraintObj=list(),constraintLabel,paramList,relationship)
More information about the Blotter-commits
mailing list