I'm using functions to return a matrix of all permutations of a
specified size from a larger list for predictor selection.
For each predictor size I use a seperate function like this:
bag2 - function(n) {
rl - c()
for (i1 in seq(n)) {
for (i2 in seq(n)) {
if
Nick Fankhauser wrote:
I'm using functions to return a matrix of all permutations of a
specified size from a larger list for predictor selection.
For each predictor size I use a seperate function like this:
bag2 - function(n) {
rl - c()
for (i1 in seq(n)) {
for (i2 in seq(n)) {
Try this:
v - 1:5
n - 2
t(subset(do.call(expand.grid, replicate(n, v, FALSE))[n:1], Var1 != Var2))
On Thu, Jan 14, 2010 at 9:51 AM, Nick Fankhauser li...@nyk.ch wrote:
I'm using functions to return a matrix of all permutations of a
specified size from a larger list for predictor selection.
Small modification below.
Peter Ehlers wrote:
Nick Fankhauser wrote:
I'm using functions to return a matrix of all permutations of a
specified size from a larger list for predictor selection.
For each predictor size I use a seperate function like this:
bag2 - function(n) {
rl - c()
4 matches
Mail list logo