| constraint.bnames {PortfolioProbe} | R Documentation |
This is not meant for direct use by users – it is an auxiliary
function for trade.optimizer and hence random.portfolio.
Returns either a vector of constraint names, or a list that also includes the constraint matrix and the vector of the number of levels for each column of the constraint matrix.
constraint.bnames(x, values.out = FALSE)
x |
required. A matrix or a data frame – unique column names are required. |
values.out |
logical value – if TRUE, then a list of information is returned.
|
If the input values.out is TRUE, then a list with the
following components:
values |
a numeric vector of values or codes that are appropriate for the C code of the optimizer. |
levels |
a vector of integers giving the number of levels for each column
of the input x.
This is zero for numeric columns.
|
bnam |
a vector of character strings that contain the names for all of
the constraints represented by x.
|
columns |
a vector giving the column number for each constraint. |
If values.out is FALSE, then just the vector corresponding to
bnam is returned.
This help was last revised 2009 October 19.
build.constraints, trade.optimizer.