Skip to content
Prev 199452 / 398506 Next

which data structure to choose to keep multile objects?

your could try something like this:

xprocess<-function(max_val) {
  result <- list()
  for (iter in  2: max_val) {

     zz = sprintf( "z%s", iter )
     # use 'character' for indexing the list
     result[[as.character(iter)]] <-nnmf(X,iter)

  }
  result

}

xprocess(10)
On Fri, Nov 6, 2009 at 6:58 PM, clue_less <suhai_tim_liu at yahoo.com> wrote: