| head.randportBurSt {PortfolioProbe} | R Documentation |
Returns the first few random portfolios or the last few random portfolios.
head.randportBurSt(x, n = 6) tail.randportBurSt(x, n = 6)
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. |
an object like the input x but shorter (usually).
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.
This help was last revised 2010 January 02.
random.portfolio, summary.randportBurSt.
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)