constraint.bnames {PortfolioProbe} | R Documentation

## Evaluate Implied Constraints

### Description

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.

### Usage

    constraint.bnames(x, values.out = FALSE)

### Arguments

`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.

### Value

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.

### Revision

This help was last revised 2009 October 19.

### See Also

`build.constraints`, `trade.optimizer`.

[Package PortfolioProbe version 1.02 Index]