[Rd] export C++ array to R

2009-04-18 Thread whizvast
Hi, I am a newbie on C++ Right now I have an array of doubles in C++. Is there a way to "export" that array into R? Of course, I can allocate the memory block first using "allocVector" and copying the array contents one by one. But, what if that array is fairly large? Copying doesn't look tha

Re: [Rd] bug in classesToAM()

2009-04-18 Thread John Chambers
Yes, thanks. Should be fixed now in r-devel and 2.9.0 patched. John hpa...@fhcrc.org wrote: Hi, I can't get the non-abbreviated class names of the rows and the cols of the Adjacency Matrix: setClass("ClassWithALongName") setClass("SubclassOfClassWithALongName", contains="ClassWithA

Re: [Rd] print.closure at the R level

2009-04-18 Thread Romain Francois
Duncan Murdoch wrote: On 18/04/2009 10:12 AM, Romain Francois wrote: Hello, Could the code that auto prints a function/closure be extracted from print.c so that there would be a print.closure function. I would like to be able to mask a print.closure function so that I have a custom auto-print

Re: [Rd] print.closure at the R level

2009-04-18 Thread Romain Francois
Duncan Murdoch wrote: On 18/04/2009 10:12 AM, Romain Francois wrote: Hello, Could the code that auto prints a function/closure be extracted from print.c so that there would be a print.closure function. I would like to be able to mask a print.closure function so that I have a custom auto-print

Re: [Rd] dotplot in a loop

2009-04-18 Thread Qifei Zhu
Ok, noted. Sorry for the confusion. -Original Message- From: Martin Maechler [mailto:maech...@stat.math.ethz.ch] Sent: Saturday, April 18, 2009 1:02 PM To: Qifei Zhu Cc: r-devel@r-project.org Subject: Re: [Rd] dotplot in a loop This is *definitely* a question for R-help, not for R-deve

Re: [Rd] dotplot in a loop

2009-04-18 Thread Martin Maechler
This is *definitely* a question for R-help, not for R-devel. Please do not misuse R-devel! Regards, Martin > "QZ" == Qifei Zhu > on Sat, 18 Apr 2009 12:34:38 -0400 writes: QZ> Hi all, QZ> I'm a newbie R developer, am trying to dotplot a few graphs using a for QZ> loop.

[Rd] dotplot in a loop

2009-04-18 Thread Qifei Zhu
Hi all, I'm a newbie R developer, am trying to dotplot a few graphs using a for loop. The following code works fine but once I wanna plot inside a loop, nothing happens. > for(i in 1:1){dotplot(y~x)} > y <- c(1,2,3) > x <- c('a','b','c') > dotplot(y~x) > for (i in 1:3) {dotplot(y~x)} (y and x de

Re: [Rd] print.closure at the R level

2009-04-18 Thread Duncan Murdoch
On 18/04/2009 10:12 AM, Romain Francois wrote: Hello, Could the code that auto prints a function/closure be extracted from print.c so that there would be a print.closure function. I would like to be able to mask a print.closure function so that I have a custom auto-print. One reason for that i

[Rd] print.closure at the R level

2009-04-18 Thread Romain Francois
Hello, Could the code that auto prints a function/closure be extracted from print.c so that there would be a print.closure function. I would like to be able to mask a print.closure function so that I have a custom auto-print. One reason for that is I plan to have syntax highlighting within the

[Rd] speedup for as.matrix.dist

2009-04-18 Thread Romain Francois
Hello, I am trying to patch as.matrix.dist to achieve some speedup. > m <- expand.grid( x = 1:20, y = 1:20, z = 1:20 ) > d <- dist( m ) > system.time( out <- stats:::as.matrix.dist( d ) ) user system elapsed 15.355 3.110 19.123 > system.time( out <- as.matrix.dist( d ) ) user system ela

[Rd] wish list: automatic package installation

2009-04-18 Thread John Fox
Dear list members, The release of R 2.9.0, reminds me of a long-standing nit that I have to pick. I prefer not to transfer and update all of the packages in my old library, because I see a new release of R as an opportunity to start with a clean slate. I'd rather install packages as I need them. M

[Rd] bug in classesToAM()

2009-04-18 Thread hpages
Hi, I can't get the non-abbreviated class names of the rows and the cols of the Adjacency Matrix: setClass("ClassWithALongName") setClass("SubclassOfClassWithALongName", contains="ClassWithALongName") Trying all possible values for 'abbreviate' (with R-2.9.0): classesToAM("SubclassOf