head.randportBurSt {PortfolioProbe} | R Documentation

## Portion of a Random Portfolio Object

### Description

Returns the first few random portfolios or the last few random portfolios.

### Usage

    head.randportBurSt(x, n = 6)
    tail.randportBurSt(x, n = 6)

### Arguments

`x` | an object of class `randportBurSt` (often created by `random.portfolio`).
`n` | the number of items to select (this is the argument to the default method). This can be a negative number if the default method that is visible allows it.

### Value

an object like the input `x` but shorter (usually).

### Details

These are methods of the generic functions `head` and `tail`. The output of these functions retains the class attribute. In contrast, regular subscripting will lose the class and the result will be a plain list.

### Revision

This help was last revised 2010 January 02.

### See Also

`random.portfolio`, `summary.randportBurSt`.

### Examples

    randport1 <- random.portfolio(100, prices, varian, long.only=TRUE,
            bench.constr=c(spx=.04^2/252), lin.constraints=cntrysect.conmat,
            lin.bounds=cntrysect.bounds, gross.value=1e6)

    head(randport1, 4) # first 4 random portfolios
    randport1[1:4] # same values but class is lost

    tail(randport1)

[Package PortfolioProbe version 1.01 Index]