I have a function called nnmf which takes in one matrix and returns two
matrices. for example,
X
[,1] [,2] [,3] [,4]
[1,]147 10
[2,]258 11
[3,]369 12
z=nnmf(X,2)
z$W
[,1] [,2]
[1,] 0.8645422 0.6643681
[2,] 1.7411863 0.5377504
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
On Fri, Nov 6, 2009 at 11:58 PM, clue_less suhai_tim_...@yahoo.com wrote:
I have a function called nnmf which takes in one matrix and returns two
matrices. for example,
X
[,1] [,2] [,3] [,4]
[1,] 1 4 7 10
[2,] 2 5 8 11
[3,] 3 6 9 12
z=nnmf(X,2)
-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of clue_less
Sent: Friday, November 06, 2009 4:58 PM
To: r-help@r-project.org
Subject: [R] which data structure to choose to keep multile objects?
I have a function called nnmf which takes in one matrix and returns
4 matches
Mail list logo