in reply to multidimensional array in Statistics::R
Looking at the docs, it seems like you'd have to set one vector of the multi-dimensional array at a time.
Something (untested) like this:
... $R->set("mat[$_]", $mat[$_] ) for 0 .. $#mat;
But you probably need to tell R that 'mat' is a matrix first by preceding the above with something like:
mat=matrix(1:12,3,4)
Or perhaps a data.frame with named columns would be a better choice. See the R docs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: multidimensional array in Statistics::R
by igelkott (Priest) on Feb 07, 2013 at 17:38 UTC |