[Rd] rJava question

2010-12-27 Thread Dominick Samperi
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")

Re: [Rd] RFC: sapply() limitation from vector to matrix, but not further

2010-12-27 Thread Gabor Grothendieck
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

Re: [Rd] RFC: sapply() limitation from vector to matrix, but not further

2010-12-27 Thread Martin Maechler
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

[Rd] aperm() should retain class of input object

2010-12-27 Thread Michael Friendly
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

Re: [Rd] minor problem in strsplit help file

2010-12-27 Thread Martin Maechler
> "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

Re: [Rd] environment question

2010-12-27 Thread Duncan Murdoch
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'