After some trial and error I figured out how to pass matrices from R to java
and back
using rJava, but this method is not documented and I wonder if there is a
better way?
Anyway, here is what I found works:
(m = matrix(as.double(1:12),3,4))
[shows m as you would expect]
jtest <- .jnew("JTest")
On Wed, Dec 1, 2010 at 3:39 AM, Martin Maechler
wrote:
> My proposal -- implemented and "make check" tested --
> is to add an optional argument 'ARRAY'
> which allows
>
>> sapply(v, myF, y = 2*(1:5), ARRAY=TRUE)
It would reduce the proliferation of arguments if the simplify=
argument were extend
Finally finding time to come back to this.
Remember that I've started the thread by proposing a version of sapply()
which does not just "stop" with making a matrix() from the lapply() result, but
instead --- only when the new argument ARRAY = TRUE is set ---
may return an array() of any (appropriat
aperm() was designed for multidimensional arrays, but is also useful for
table objects, particularly
with the lattice, vcd and vcdExtra packages. But aperm() was designed
and implemented before other
related object classes were conceived, and I propose a small tune-up to
make it more generally
> "PatB" == Patrick Burns
> on Fri, 24 Dec 2010 10:27:23 + writes:
PatB> The 'extended' argument to 'strsplit' has been
PatB> removed, but it is still mentioned in the argument
PatB> items in the help file for 'fixed' and 'perl'.
Indeed; thank you Pat!
I've committed
On 10-12-26 4:30 PM, Paul Johnson wrote:
> Hello, everybody.
>
> I'm putting together some lecture notes and course exercises on R
> programming. My plan is to pick some R packages, ask students to read
> through code and see why things work, maybe make some changes. As I
> look for examples, I'