search for: genmultiindices

Displaying 1 result from an estimated 1 matches for "genmultiindices".

2010 Jun 19
2
Call by reference or suggest workaround
...ature of the computation I need to pass around the *same* matrix object (where each row corresponds to one multi-index). As pass by reference wasn't the default behavior I declared a global matrix (mat) and used the <<- operator to write to the global matrix. So the usage would be to call genMultiIndices(3,2) for side effects to generate all multi-indices of length 3 and sum 2. And then access the global matrix. However, after coding this I can't seem to export the global matrix object (in the NAMESPACE file) and still retain mutability since its binding is "locked" (R throws an erro...