Re: [Rd] Enhancement request: anonymous connections

2006-01-03 Thread Seth Falcon
On 1 Jan 2006, [EMAIL PROTECTED] wrote: > However, that just isn't how connections are documented in the Green > Book (referenced on all the relevant help pages, so required > reading) and getConnection() allows you to create an R object > pointing to a connection that previously had none. Yes,

Re: [Rd] S4 default initialization: unwanted NULL

2006-01-03 Thread John Chambers
Seth Falcon wrote: >On 3 Jan 2006, [EMAIL PROTECTED] wrote: > > >>It's legal to have virtual classes as slots, but yes, the slot is >>NULL in the prototype for the new class, unless the user specifies a >>value. In your case, providing a non-null prototype for the >>data.frame slot might be th

Re: [Rd] can someone help me understand LAM/MPI and Rmpi for use on a cluster

2006-01-03 Thread Martin Morgan
Here's my slow response; if there were other off-list replies it would be great to have a summary. Not exactly sure what you're looking for. You might adopt a parallel program so that the 'master' node does something like myprog.c: MPI_Init(...) /* parallel computations, e.g., of pi */

Re: [Rd] S4 default initialization: unwanted NULL

2006-01-03 Thread Seth Falcon
On 3 Jan 2006, [EMAIL PROTECTED] wrote: > It's legal to have virtual classes as slots, but yes, the slot is > NULL in the prototype for the new class, unless the user specifies a > value. In your case, providing a non-null prototype for the > data.frame slot might be the desired solution. Yes, t

Re: [Rd] S4 default initialization: unwanted NULL

2006-01-03 Thread Seth Falcon
On 3 Jan 2006, [EMAIL PROTECTED] wrote: > you might need a call to "setOldClass"; see Section "Register or > Convert?" of the corresponding help page. That doesn't seem to make a difference. Note that other non-S4 slots like "matrix" initialize in an appropriate (non-NULL) fashion. ___

Re: [Rd] S4 default initialization: unwanted NULL

2006-01-03 Thread John Chambers
S3 classes are treated as virtual classes, with or without a call to setOldClass()--the purpose of setOldClass() is to make method dispatch with S3 inheritance work. It's legal to have virtual classes as slots, but yes, the slot is NULL in the prototype for the new class, unless the user specif

Re: [Rd] S4 default initialization: unwanted NULL

2006-01-03 Thread Matthias Kohl
you might need a call to "setOldClass"; see Section "Register or Convert?" of the corresponding help page. Matthias Seth Falcon schrieb: >The default initialization for slots of class "factor" and >"data.frame" gives NULL. This seems odd, since those slots can't ever >be set to NULL by the use

Re: [Rd] checkpointing

2006-01-03 Thread Ross Boylan
On Tue, Jan 03, 2006 at 01:26:39PM +, Prof Brian Ripley wrote: > On Tue, 3 Jan 2006, Kasper Daniel Hansen wrote: > > >On Jan 3, 2006, at 9:36 AM, Brian D Ripley wrote: > > > >>I use save.image() or save(), which seem exactly what you are asking for. > > > >I have the (perhaps unsupported) impr

[Rd] S4 default initialization: unwanted NULL

2006-01-03 Thread Seth Falcon
The default initialization for slots of class "factor" and "data.frame" gives NULL. This seems odd, since those slots can't ever be set to NULL by the user. I would expect zero-length instances of factor and data.frame. Here is an example: setClass("FOO", representation(a="factor", b="data.fram

Re: [Rd] Problems with calloc function.

2006-01-03 Thread Marcelo Damasceno
Hello all and Prof. Brian Ripley , Sorry about my incautiousness, I use the tips, but is happen same problems. Below the R code. rspcplot <- function(file1="dg_01.lab.txt"){ if(is.null(n)) stop("You need first run the function

Re: [Rd] checkpointing

2006-01-03 Thread Kasper Daniel Hansen
On Jan 3, 2006, at 2:26 PM, Prof Brian Ripley wrote: > On Tue, 3 Jan 2006, Kasper Daniel Hansen wrote: > >> On Jan 3, 2006, at 9:36 AM, Brian D Ripley wrote: >> >>> I use save.image() or save(), which seem exactly what you are >>> asking for. >> >> I have the (perhaps unsupported) impression th

Re: [Rd] checkpointing

2006-01-03 Thread Barry Rowlingson
Roger D. Peng wrote: > One possibility is to write in some checkpointing into your objective > function, > such as saving the current parameter values via 'save()' or 'dput()'. Has anyone successfully checkpointed and restarted R using any of the linux process checkpointing solutions I find w

Re: [Rd] checkpointing

2006-01-03 Thread Roger D. Peng
One possibility is to write in some checkpointing into your objective function, such as saving the current parameter values via 'save()' or 'dput()'. -roger Ross Boylan wrote: > I would like to checkpoint some of my calculations in R, specifically > those using optim. As far as I can tell, R do

Re: [Rd] checkpointing

2006-01-03 Thread Prof Brian Ripley
On Tue, 3 Jan 2006, Kasper Daniel Hansen wrote: > On Jan 3, 2006, at 9:36 AM, Brian D Ripley wrote: > >> I use save.image() or save(), which seem exactly what you are asking for. > > I have the (perhaps unsupported) impression that Ross wanted to save the > progress during the optim run. Since it

Re: [Rd] checkpointing

2006-01-03 Thread Gabor Grothendieck
One possibility for overcoming this problem might be to divide the variables being optimized over into two sets using a grid over one set (which should probably consist of only one or two variables) and then fixing the gridded variables use optim over the rest. In many problems its really just one

Re: [Rd] checkpointing

2006-01-03 Thread Kasper Daniel Hansen
On Jan 3, 2006, at 9:36 AM, Brian D Ripley wrote: > I use save.image() or save(), which seem exactly what you are > asking for. I have the (perhaps unsupported) impression that Ross wanted to save the progress during the optim run. Since it spends most of its time in the .Internal(optim(***

Re: [Rd] R crash with complex matrix algebra when using EISPACK=TRUE

2006-01-03 Thread Peter Dalgaard
"Ole F. Christensen" <[EMAIL PROTECTED]> writes: > Brain, Thank you very much for your help. * You seem to be using call-by-value semantics rather than call-by-name... -- O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box

Re: [Rd] R crash with complex matrix algebra when using EISPACK=TRUE

2006-01-03 Thread Prof Brian Ripley
Well, valgrind helps a lot more here: it points at lines 2131 and 2135-6 of eigen.f, and using gdb shows those are called with NA = 0. So it is a bug in EISPACK, and easy enough to fix -- now done. On Tue, 3 Jan 2006, Ole F. Christensen wrote: > Brain, Thank you very much for your help. > Using

Re: [Rd] R crash with complex matrix algebra when using EISPACK=TRUE

2006-01-03 Thread Ole F. Christensen
Brain, Thank you very much for your help. Using gctorture I was able to produce a simple function call showing the problem. Gm <- rbind(c(-0.3194373786, 0.2444066686, 0.0428108831, 3.221983e-02), c(0.0002071301, -0.0003282719, 0.0001211418, 5.128830e-12),

Re: [Rd] checkpointing

2006-01-03 Thread Brian D Ripley
I use save.image() or save(), which seem exactly what you are asking for. On Mon, 2 Jan 2006, Ross Boylan wrote: > I would like to checkpoint some of my calculations in R, specifically > those using optim. As far as I can tell, R doesn't have this facility, > and there seems to have been little