###
### 100 long only portfolios of 30 investments with 30 non-zero positions
###
x.matrix <- rlongonly( 100, 30 )
###
### 100 long only portfolios of 30 investments with 10 non-zero positions
###
y.matrix <- rlongonly( 100, 30, 10 )
Run the code above in your browser using DataLab